blob: 347624134d884e07fb7832ed358d6b655b3252a2 [file] [log] [blame]
#!/bin/sh
### BEGIN INIT INFO
# Provides: launcher
# Required-Start: $syslog $local_fs $remote_fs
# Required-Stop: $syslog $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: 66xx launcher Daemon
### END INIT INFO
. /etc/init.d/init-functions
prog=launcher
PIDFILE=/var/run/$prog.pid
DESC="66xx launcher Daemon"
start() {
log_daemon_msg "Starting $DESC" "$prog"
start_daemon_background -p $PIDFILE /usr/bin/wmt_launcher -p /lib/firmware
if [ $? -ne 0 ]; then
log_end_msg 1
exit 1
fi
if [ $? -eq 0 ]; then
log_end_msg 0
fi
exit 0
}
stop() {
log_daemon_msg "Stopping $DESC" "$prog"
killproc -p $PIDFILE /usr/bin/wmt_launcher
if [ $? -ne 0 ]; then
log_end_msg 1
exit 1
fi
if [ $? -eq 0 ]; then
log_end_msg 0
fi
}
force_reload() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
force-reload)
force_reload
;;
restart)
stop
start
;;
*)
echo "$Usage: $prog {start|stop|force-reload|restart}"
exit 2
esac