Sunrise time overlay; systemd upload separation; bug fixes
daily_sunrise_video.sh: - Fixed: was using undefined \$MOVIES_DIR (now \$BASE_DIR/movies) - Fixed: sunrise_overlay.py was called but never existed — would fail daily - Fixed: speed-adjust step had no explicit codec (-c:v libx264 missing) - New: sunrise time overlaid as stacked vertical characters on the right side using ffmpeg drawtext — no Python/Pillow dependency - New: upload removed from script; now triggered by systemd OnSuccess= - Combines speed-adjust and overlay into one ffmpeg pass (was two) - SUNRISE_OVERLAY_OPACITY from conf controls transparency install.sh: - sky-cam-sunrise.service gains OnSuccess=sky-cam-sunrise-upload.service so upload only runs when video creation succeeds, with separate log - New sky-cam-sunrise-upload.service runs sunrise2mm.py sunrise2mm.py: add shebang + chmod +x so systemd ExecStart= calls it directly sky-cam.conf: add SUNRISE_OVERLAY_OPACITY=0.45 https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
+32
-4
@@ -75,10 +75,38 @@ EOF
|
||||
echo " wrote sky-cam-notify-failure@.service"
|
||||
|
||||
# ── Sunrise video — SUNRISE_CAM only ─────────────────────────────────────────
|
||||
write_service "sky-cam-sunrise" \
|
||||
"$SUNRISE_CAM: daily sunrise video → Mattermost" \
|
||||
"daily_sunrise_video.sh" \
|
||||
"After=network-online.target\nWants=network-online.target\n"
|
||||
# OnSuccess= triggers the upload service only when video creation succeeds.
|
||||
cat > "$UNIT_DIR/sky-cam-sunrise.service" <<EOF
|
||||
[Unit]
|
||||
Description=Sky-Cam — $SUNRISE_CAM: daily sunrise video
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
OnFailure=sky-cam-notify-failure@%n.service
|
||||
OnSuccess=sky-cam-sunrise-upload.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=$SCRIPT_DIR/daily_sunrise_video.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
EOF
|
||||
echo " wrote sky-cam-sunrise.service"
|
||||
|
||||
cat > "$UNIT_DIR/sky-cam-sunrise-upload.service" <<EOF
|
||||
[Unit]
|
||||
Description=Sky-Cam — $SUNRISE_CAM: upload daily sunrise to Mattermost
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
OnFailure=sky-cam-notify-failure@%n.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=$SCRIPT_DIR/sunrise2mm.py
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
EOF
|
||||
echo " wrote sky-cam-sunrise-upload.service"
|
||||
|
||||
write_timer "sky-cam-sunrise" "$SUNRISE_CAM: daily sunrise video" "$SCHEDULE_SUNRISE"
|
||||
|
||||
timers=(sky-cam-sunrise)
|
||||
|
||||
Reference in New Issue
Block a user