4 PIDFILE
=/var
/run
/$NAME.pid
5 DAEMON
=/opt
/domoticz
/$NAME
6 DAEMON_ARGS
="-daemon -www 8080 -sslwww 443"
9 printf "Starting $NAME: "
10 start-stop-daemon
-S -q -m -b -p $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
11 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
14 printf "Stopping $NAME: "
15 start-stop-daemon
-K -q -p $PIDFILE
16 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
34 echo "Usage: $0 {start|stop|restart}"