2 DAEMON="/usr/bin/${NAME}"
3 PID_F="/run/${NAME}.pid"
6 [ -r /etc/default/${NAME} ] && . /etc/default/${NAME}
10 printf "Starting ${NAME}: "
11 if [ -z "${OWSERVER_ARGS}" ]; then
12 echo "OWSERVER_ARGS must be set in defaults file" 1>&2
15 start-stop-daemon -S -x ${DAEMON} -- \
16 --pid_file ${PID_F} ${OWSERVER_ARGS}
17 [ $? -eq 0 ] && echo "OK" || echo "FAIL"
20 printf "Stopping ${NAME}: "
21 start-stop-daemon -K -p ${PID_F}
22 [ $? -eq 0 ] && echo "OK" || echo "FAIL"
29 echo "Usage: $0 {start|stop|restart|reload}"