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:
+2
-2
@@ -45,8 +45,8 @@ today_date_str = today.strftime("%Y-%m-%d") # e.g., "2024-11-05"
|
||||
today_month_str = today.strftime("%Y-%m") # e.g., "2024-11"
|
||||
|
||||
# Set the full folder path for today's video
|
||||
base_video_folder = "/home/motion/drives/local-2tb/movies/sunrise" # Correct base folder for videos
|
||||
output_dir = os.path.join(base_video_folder, today_month_str, "sunrise-only") # Subfolder for final videos
|
||||
base_video_folder = os.path.join(config.get('BASE_DIR', ''), 'movies', config.get('CAM_NAME', 'sunrise'))
|
||||
output_dir = os.path.join(base_video_folder, today_month_str, "sunrise-only")
|
||||
|
||||
# Check if the directory exists
|
||||
if not os.path.isdir(output_dir):
|
||||
|
||||
Reference in New Issue
Block a user