Add Ubuntu deployment: scripts, SSL, systemd and setup.sh

This commit is contained in:
shop
2026-06-25 16:47:01 +03:00
parent ee5688f722
commit 8a7f79a70c
19 changed files with 387 additions and 58 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Быстрая установка на Ubuntu — запуск: sudo bash setup.sh
set -euo pipefail
cd "$(dirname "$0")"
if [[ "${EUID}" -ne 0 ]]; then
echo "Запустите: sudo bash setup.sh"
exit 1
fi
bash scripts/install-ubuntu.sh
REAL_USER="${SUDO_USER:-ubuntu}"
if id "${REAL_USER}" &>/dev/null; then
sudo -u "${REAL_USER}" bash scripts/deploy.sh
else
bash scripts/deploy.sh
fi
echo ""
echo "Готово! Откройте http://$(hostname -I | awk '{print $1}')"