You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
598 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. # systemd unit - kernelHelperMediaMTX reads WorkingDirectory (mediamtx.log) and restarts "mediamtx.service"
  2. [Unit]
  3. Description=MediaMtx (C++) - RTSP cameras to WebRTC and fMP4 recordings
  4. After=network-online.target
  5. Wants=network-online.target
  6. [Service]
  7. WorkingDirectory=/srv/mediamtx
  8. ExecStart=/usr/local/bin/mediamtx --paths /srv/mediamtx/mediamtx.paths --logFile /srv/mediamtx/mediamtx.log --logStdout no --recordPath ./recordings/%%path/%%Y-%%m-%%d_%%H-%%M-%%S-%%f --recordSegmentDuration 60s
  9. ExecReload=/bin/kill -HUP $MAINPID
  10. Restart=always
  11. RestartSec=2
  12. [Install]
  13. WantedBy=multi-user.target