summaryrefslogtreecommitdiff
path: root/ntfy
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-10-31 22:45:58 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-10-31 22:45:58 +0900
commit05e1418efa56a773c295a2e072796e220d8d8f51 (patch)
tree5669d97650919db74e6f5f0174880e6e9221d770 /ntfy
parentf48002a02c7b75de8add369672c861f63e900df4 (diff)
hetzner-admin: stop/start individual services, shown as STOPPED on status page
- run-command.sh: services / stop <name> / start <name> for app and infra stacks (not caddy, hetzner-admin, status). Stopped names go to status/stopped.txt (gitignored). - status: a stopped service that does not respond is STOPPED (gray), excluded from uptime and DOWN alerts. If it responds it is UP as usual. - Infra deploy.sh skips stopped stacks; app repo pushes clear the flag. - claude-code@.service: Restart=on-failure, and restart-sessions.sh restarts one unit at a time, to avoid the tmux "server exited unexpectedly" race. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N5eS3U54gzjRXzm65Np1RS
Diffstat (limited to 'ntfy')
-rwxr-xr-xntfy/deploy.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/ntfy/deploy.sh b/ntfy/deploy.sh
index 239c3db..cc11b5f 100755
--- a/ntfy/deploy.sh
+++ b/ntfy/deploy.sh
@@ -1,6 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
+
+# 管理画面で停止中なら起動しない(Start で stopped.txt から外れる)
+if grep -qx ntfy ../status/stopped.txt 2>/dev/null; then
+ echo "ntfy: 管理画面で停止中のためスキップ"
+ exit 0
+fi
docker compose pull -q
# server.yml はファイル単位のマウントなので、git checkout で差し替わった内容を反映するため再作成する
docker compose up -d --force-recreate