systemd management scripts
This commit is contained in:
13
scripts/edit.sh
Executable file
13
scripts/edit.sh
Executable 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"
|
||||
Reference in New Issue
Block a user