mjpeg relay skripte

master
Jure Podgorše 2023-06-06 16:33:42 +02:00
parent ffd3ede9c3
commit 2f896fac69
2 changed files with 9 additions and 2 deletions

5
mjpeg-relay.sh 100755
View File

@ -0,0 +1,5 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/mjpeg-relay
python2 relay.py http://localhost:8989/stream

View File

@ -7,9 +7,11 @@ After=network.target
User=g1smo User=g1smo
RemainAfterExit=yes RemainAfterExit=yes
WorkingDirectory=/home/g1smo/galerija-bot/mjpeg-relay WorkingDirectory=/home/g1smo/galerija-bot/mjpeg-relay
ExecStart=python2 relay.py http://localhost:8989/stream ExecStart=/usr/bin/screen -DmS mjpeg-relay /home/g1smo/galerija-bot/mjpeg-relay.sh
RestartSec=5 RestartSec=5
Restart=always #Restart=always
Restart=on-failure
Type=forking
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target