20 lines
497 B
SYSTEMD
20 lines
497 B
SYSTEMD
|
[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
|