Files
2026-04-24 08:25:48 +00:00

15 lines
413 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
REPO="$(cd "$(dirname "$0")/.." && pwd)"
MSG="${1:-Update nginx srv1361159.hstgr.cloud}"
cp -a /etc/nginx/sites-available/srv1361159.hstgr.cloud "$REPO/nginx/srv1361159.hstgr.cloud"
cd "$REPO"
git add nginx/srv1361159.hstgr.cloud
if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
fi
git commit -m "$MSG"
git push origin main
echo "OK: committed and pushed."