python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / owfs / S25owserver
blobb8da768e96ff20a0c6cf6439ba5235d6754175b8
1 NAME="owserver"
2 DAEMON="/usr/bin/${NAME}"
3 PID_F="/run/${NAME}.pid"
5 OWSERVER_ARGS=
6 [ -r /etc/default/${NAME} ] && . /etc/default/${NAME}
8 case "$1" in
9 start)
10         printf "Starting ${NAME}: "
11         if [ -z "${OWSERVER_ARGS}" ]; then
12                 echo "OWSERVER_ARGS must be set in defaults file" 1>&2
13                 exit 1
14         fi
15         start-stop-daemon -S -x ${DAEMON} -- \
16                 --pid_file ${PID_F} ${OWSERVER_ARGS}
17         [ $? -eq 0 ] && echo "OK" || echo "FAIL"
18         ;;
19 stop)
20         printf "Stopping ${NAME}: "
21         start-stop-daemon -K -p ${PID_F}
22         [ $? -eq 0 ] && echo "OK" || echo "FAIL"
23         ;;
24 restart|reload)
25         $0 stop
26         $0 start
27         ;;
29         echo "Usage: $0 {start|stop|restart|reload}"
30         exit 1
31 esac