mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
big shot
This commit is contained in:
+19
-2
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user