This commit is contained in:
legop3
2025-11-28 02:29:47 -05:00
parent 5debdbed94
commit 0cfac796d8
5 changed files with 73 additions and 36 deletions
+19 -2
View File
@@ -198,6 +198,10 @@ install -D -o root -g root -m 0755 pi/bin/video-publisher.sh /usr/local/bin/vide
log "Installed video-publisher helper"
install -m 0644 pi/systemd/video-publisher.service /etc/systemd/system/video-publisher.service
log "Installed video-publisher systemd unit"
# Install audio capture assets (arecord -> FIFO)
install -D -o root -g root -m 0755 pi/bin/audio-capture.sh /usr/local/bin/audio-capture
install -m 0644 pi/systemd/audio-capture.service /etc/systemd/system/audio-capture.service
log "Installed audio-capture helper + systemd unit"
install -d -o roverd -g roverd /var/lib/roverd
cat > /var/lib/roverd/video.env <<'ENV'
# Managed by roverd; placeholder values will be overwritten at runtime.
@@ -213,18 +217,31 @@ AUDIO_CHANNELS=2
ENV
chown roverd:roverd /var/lib/roverd/video.env
chmod 0640 /var/lib/roverd/video.env
# Create persistent audio FIFO for capture -> publisher
FIFO_PATH="/var/lib/roverd/audio.pcm"
if [[ -p "$FIFO_PATH" ]]; then
chown roverd:audio "$FIFO_PATH"
chmod 0660 "$FIFO_PATH"
else
rm -f "$FIFO_PATH"
mkfifo "$FIFO_PATH"
chown roverd:audio "$FIFO_PATH"
chmod 0660 "$FIFO_PATH"
fi
install_audio_support
systemctl daemon-reload
systemctl enable roverd.service
systemctl enable audio-capture.service
systemctl enable video-publisher.service
if [[ $CONFIG_EXISTS -eq 1 ]]; then
systemctl restart roverd.service
systemctl restart audio-capture.service
systemctl restart video-publisher.service
log "Restarted roverd + video publisher"
log "Restarted roverd, audio-capture, video publisher"
else
log "Skipped auto-start because config is the sample; edit $CONFIG_DEST then run: sudo systemctl restart roverd video-publisher"
log "Skipped auto-start because config is the sample; edit $CONFIG_DEST then run: sudo systemctl restart roverd audio-capture video-publisher"
fi
log "Install complete"