Files
pi-dashboard-server/scripts/edit.sh

14 lines
373 B
Bash
Raw Normal View History

2026-02-17 12:13:39 +09:00
#!/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"