Files
sky-cam/sky-cam.conf
T
Claude ac01c05948 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
2026-04-18 17:11:06 +00:00

34 lines
1.5 KiB
Plaintext

# sky-cam.conf — single config for all sky-cam scripts and Python helpers.
#
# Bash scripts source this file:
# source "$(dirname "$(realpath "$0")")/sky-cam.conf"
#
# Python reads it with key=value parsing (same format, quotes stripped).
#
# Copy this file to your scripts directory and fill in every value.
# Lines starting with # are comments and are ignored.
# ── Paths ─────────────────────────────────────────────────────────────────────
BASE_DIR=/home/motion/drives/local-2tb
MUSIC_DIR=/home/motion/drives/local-2tb/music/4 Seasons
TIMEZONE=America/New_York
# ── Mattermost — daily sunrise upload ────────────────────────────────────────
mattermost_url=https://your-mattermost-server.example.com
access_token=your-access-token-here
channel_id=your-daily-upload-channel-id-here
# ── Notifications — movement montage + year-end video complete / job failure ──
# ntfy: https://ntfy.sh (cloud) or self-hosted. Set topic URL below.
NTFY_ENABLED=false
NTFY_URL=https://ntfy.sh/your-topic-here
# Email: requires the 'mail' command (mailutils / s-nail).
EMAIL_ENABLED=false
EMAIL_TO=you@example.com
EMAIL_FROM=skycam@localhost
# Mattermost text post (can be same channel as daily upload or a private one).
MM_NOTIFY_ENABLED=false
MM_NOTIFY_CHANNEL_ID=your-notify-channel-id-here