systemd management scripts

This commit is contained in:
2026-02-17 12:13:39 +09:00
parent 60d99a993f
commit af7fb2beaf
4 changed files with 108 additions and 22 deletions

13
scripts/edit.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Open the alarm config in an editor, then restart the service.
set -euo pipefail
PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
CONFIG="${PROJECT_DIR}/config/alarms.json"
${EDITOR:-nano} "${CONFIG}"
echo "==> Restarting pi-dashboard service..."
sudo systemctl restart pi-dashboard
echo "==> Done. Check status with: systemctl status pi-dashboard"