Initial: Project justice — nginx srv1361159.hstgr.cloud
Made-with: Cursor
This commit is contained in:
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
SRC="$(cd "$(dirname "$0")/.." && pwd)/nginx/srv1361159.hstgr.cloud"
|
||||
DST="/etc/nginx/sites-available/srv1361159.hstgr.cloud"
|
||||
install -o root -g root -m 644 "$SRC" "$DST"
|
||||
nginx -t
|
||||
systemctl reload nginx
|
||||
echo "OK: deployed $SRC -> $DST and nginx reloaded."
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/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 README.md scripts 2>/dev/null || git add nginx/srv1361159.hstgr.cloud
|
||||
if git diff --cached --quiet 2>/dev/null; then
|
||||
echo "No changes to commit."
|
||||
exit 0
|
||||
fi
|
||||
git commit -m "$MSG" || true
|
||||
TOKEN="$(cat /root/.config/gitea-justice.token)"
|
||||
git push "https://giteaadmin:${TOKEN}@git.srv1361159.hstgr.cloud/giteaadmin/justice.git" main
|
||||
echo "OK: committed and pushed."
|
||||
Reference in New Issue
Block a user