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

# systemd unit - kernelHelperMediaMTX reads WorkingDirectory (mediamtx.log) and restarts "mediamtx.service"
[Unit]
Description=MediaMtx (C++) - RTSP cameras to WebRTC and fMP4 recordings
After=network-online.target
Wants=network-online.target
[Service]
WorkingDirectory=/srv/mediamtx
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
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target