|
@@ -119,18 +119,22 @@ cat <<'EOF'>> gerbera.service
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
case "$1" in
|
|
|
- start)
|
|
|
+ start|restart)
|
|
|
+ if pgrep -x "gerbera" > /dev/null
|
|
|
+ then
|
|
|
+ sudo killall -9 gerbera | true
|
|
|
+ fi
|
|
|
su wareck -c "screen -dmS gerbera /usr/local/bin/gerbera -e enp5s0 -p 49152"
|
|
|
;;
|
|
|
stop)
|
|
|
sudo killall -9 gerbera | true
|
|
|
;;
|
|
|
*)
|
|
|
- echo "Usage: /etc/init.d/gerbera.service {start|stop}"
|
|
|
+ echo "Usage: /etc/init.d/gerbera.service {start|restart|stop}"
|
|
|
exit 1
|
|
|
;;
|
|
|
esac
|