All paths into sky-cam.conf; install.sh generates systemd units
sky-cam.conf - Add SCRIPT_DIR (install location) and CAM_NAME (camera/folder name) - These are the only values that change when deploying to a new machine install.sh (new) - Sources sky-cam.conf, generates all systemd .service and .timer units with correct ExecStart paths, then enables and starts the timers - Run once after editing sky-cam.conf; run again if paths change - Supports --system flag for system-wide install All .sh scripts + sunrise2mm.py - No hardcoded paths remain - script_name=$(basename ...) derivation replaced by $CAM_NAME from conf - sunrise_video.10s.sh now sources sky-cam.conf for BASE_DIR, CAM_NAME, and SCRIPT_DIR (replaces all /home/motion/... references) - sunrise2mm.py builds video path from BASE_DIR + CAM_NAME in conf systemd/ template files kept as reference but no longer need editing https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
+16
-6
@@ -5,12 +5,22 @@
|
||||
#
|
||||
# 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.
|
||||
# Fill in every value below, then run ./install.sh to deploy systemd timers.
|
||||
# You should not need to edit any other file.
|
||||
|
||||
# ── Paths ─────────────────────────────────────────────────────────────────────
|
||||
# ── Install location ──────────────────────────────────────────────────────────
|
||||
# Full path to the directory containing this conf file and all the scripts.
|
||||
SCRIPT_DIR=/home/motion/drives/local-2tb/sunrise-scripts
|
||||
|
||||
# Camera name — used as the subfolder name under BASE_DIR and BASE_DIR/movies.
|
||||
# E.g. "sunrise" → images at $BASE_DIR/sunrise/YYYY-MM-DD/, videos at $BASE_DIR/movies/sunrise/
|
||||
CAM_NAME=sunrise
|
||||
|
||||
# ── Storage ───────────────────────────────────────────────────────────────────
|
||||
BASE_DIR=/home/motion/drives/local-2tb
|
||||
MUSIC_DIR=/home/motion/drives/local-2tb/music/4 Seasons
|
||||
|
||||
# ── Timezone (IANA name) ──────────────────────────────────────────────────────
|
||||
TIMEZONE=America/New_York
|
||||
|
||||
# ── Mattermost — daily sunrise upload ────────────────────────────────────────
|
||||
@@ -18,8 +28,8 @@ 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.
|
||||
# ── Notifications — montage/year-end complete + job failure ───────────────────
|
||||
# ntfy: https://ntfy.sh (cloud) or self-hosted.
|
||||
NTFY_ENABLED=false
|
||||
NTFY_URL=https://ntfy.sh/your-topic-here
|
||||
|
||||
@@ -28,6 +38,6 @@ 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).
|
||||
# Mattermost text post (can be same or different channel from daily upload).
|
||||
MM_NOTIFY_ENABLED=false
|
||||
MM_NOTIFY_CHANNEL_ID=your-notify-channel-id-here
|
||||
|
||||
Reference in New Issue
Block a user