Add ip bindings to .env and Add stalwart-cli install script

This commit is contained in:
2026-09-14 20:51:29 +03:00
parent 1cd38af60e
commit 4c1fcc6d6f
7 changed files with 96 additions and 4 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail
installer_url="https://github.com/stalwartlabs/cli/releases/latest/download/stalwart-cli-installer.sh"
if ! command -v curl >/dev/null 2>&1; then
printf '%s\n' 'curl is required to install stalwart-cli.' >&2
exit 1
fi
if [[ "${EUID}" -eq 0 ]]; then
curl --fail --silent --show-error --location --proto '=https' --tlsv1.2 "$installer_url" | sh
else
if ! command -v sudo >/dev/null 2>&1; then
printf '%s\n' 'Run this script as root or install sudo for a system-wide installation.' >&2
exit 1
fi
curl --fail --silent --show-error --location --proto '=https' --tlsv1.2 "$installer_url" | sudo sh
fi
command -v stalwart-cli >/dev/null 2>&1 && stalwart-cli --version