h264-vsrv/system/mediamtx.service
2024-04-19 14:19:18 +03:00

20 lines
497 B
Desktop File

[Unit]
Description=MediaMTX
Requires=docker.service
After=docker.service
[Service]
TimeoutStartSec=0
Restart=on-failure
ExecStartPre=-/usr/bin/docker exec %n stop
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker pull bluenviron/mediamtx:latest
ExecStart=/usr/bin/docker run --rm --name %n --network=host \
-e TZ=Europe/Moscow \
-v /etc/mediamtx.yml:/mediamtx.yml \
-v /var/lib/mediamtx:/var/lib/mediamtx \
bluenviron/mediamtx:latest
[Install]
WantedBy=multi-user.target