34 lines
584 B
Bash
Executable File
34 lines
584 B
Bash
Executable File
#! /bin/sh
|
|
|
|
NAME=sprinklersd
|
|
DAEMON=/opt/Domo/bin/$NAME
|
|
|
|
export LD_LIBRARY_PATH=/opt/Domo/lib/
|
|
|
|
# Gracefully exit if the package has been removed.
|
|
test -x $DAEMON || exit 0
|
|
|
|
case "$1" in
|
|
start)
|
|
printf "Starting $NAME: "
|
|
start-stop-daemon -S -q -b -x $DAEMON --
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
;;
|
|
stop)
|
|
printf "Stopping $NAME: "
|
|
start-stop-daemon -K -q -n $NAME
|
|
;;
|
|
restart|reload)
|
|
echo "Restarting $NAME: "
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart|reload}" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|