/etc/init.d/olad is in ola 0.10.5.nojsmin-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #!/bin/sh
### BEGIN INIT INFO
# Provides: olad
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: OLA daemon
# Description: Open Lighting Architecture daemon
### END INIT INFO
PATH=/usr/local/bin:/bin:/usr/bin
NAME=olad
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
DESC="OLA daemon"
USER=olad
LOG_LEVEL=3
DAEMON_ARGS="--syslog --log-level 3 --config-dir /etc/ola"
CONFIG_DIR="/var/lib/ola/conf"
# Reads config file (will override defaults above)
[ -r /etc/default/ola ] && . /etc/default/ola
[ -x "$DAEMON" ] || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
# master switch
if [ -n "$DAEMON_ARGS" ] ; then
log_daemon_msg "Starting $DESC" "$NAME"
/sbin/start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --umask 0002 --chuid $USER --exec $DAEMON -- $DAEMON_ARGS
log_end_msg $?
fi
;;
stop)
# master switch
log_daemon_msg "Stopping $DESC" "$NAME"
/sbin/start-stop-daemon --stop --pidfile $PIDFILE --chuid $USER --exec $DAEMON --retry 10
/bin/rm -f $PIDFILE
log_end_msg $?
;;
reload|force-reload|restart)
$0 stop && $0 start
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0
|