Consolidate config into sky-cam.conf; systemd failure notifications
sky-cam.conf (new) - Single file replaces mattermost_config.txt reference, notify_config.txt, and the hardcoded BASE_DIR/MUSIC_DIR/TIMEZONE scattered across scripts - Bash-sourceable and Python key=value readable (same format) All .sh scripts - source sky-cam.conf at startup; BASE_DIR / MUSIC_DIR from config sunrise2mm.py - Reads sky-cam.conf relative to script location; no hardcoded path notify.sh - Sources sky-cam.conf; Mattermost credentials come from there directly, no separate mattermost_config.txt lookup needed systemd/sky-cam-notify-failure@.service (new) - Template unit called by OnFailure= in each service - Sends notification via notify.sh when any sky-cam job fails - All three .service units now have OnFailure=sky-cam-notify-failure@%n.service Removed: notify_config.txt, sky-cam.crontab (superseded) https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
+2
-1
@@ -8,9 +8,10 @@
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
||||
source "$SCRIPT_DIR/sky-cam.conf"
|
||||
|
||||
# ── Configuration ──────────────────────────────────────────────────────────────
|
||||
base_dir="/home/motion/drives/local-2tb"
|
||||
base_dir="$BASE_DIR"
|
||||
FULLDAY_FPS=5 # timelapse frame rate — adjust to taste
|
||||
RETENTION_DAYS=10 # full-day videos older than this are deleted
|
||||
|
||||
|
||||
Reference in New Issue
Block a user