4 DAEMON
="/usr/sbin/${NAME}"
6 CFG_FILE
="/etc/default/${NAME}"
7 PID_FILE
="/var/run/${NAME}.pid"
9 # Read configuration variable file if it is present
10 [ -r "${CFG_FILE}" ] && .
"${CFG_FILE}"
14 printf "Starting ${NAME}: "
15 start-stop-daemon
-S -q -x "${DAEMON}" -- ${DAEMON_ARGS}
16 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
21 printf "Stopping ${NAME}: "
22 # This daemon does not exit properly with the default TERM signal unless
23 # it's forced to work by something reading /dev/random. Killing it and
24 # removing its PID file is more straightforward.
25 if start-stop-daemon
-K -q -s KILL
-p "${PID_FILE}" -n "${NAME}"; then
45 echo "Usage: $0 {start|stop|restart|reload}" >&2