Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions os/mediamtx/mediamtx.service
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# https://mediamtx.org/docs/usage/start-on-boot#linux

[Unit]
After=network.target
Wants=network.target
After=network-online.target
Wants=network-online.target

[Service]
# Rewrite /etc/mediamtx.yaml with this device's real hostname and IP before
# mediamtx loads it, replacing the placeholders shipped in the YAML template.
# Without this, WebRTC ICE candidates advertise "raspberrypi" which browsers
# cannot resolve, causing silent peer-connection failures (dashboard preview
# spins forever).
ExecStartPre=/usr/bin/node /opt/PlanktoScope/lib/mediamtx.js
ExecStart=/usr/local/bin/mediamtx /etc/mediamtx.yaml

[Install]
Expand Down