1
0
Fork 0
mirror of https://github.com/RobotechLille/cdf2018-principal synced 2024-12-23 06:00:36 +01:00
cdf2018-principal/raspberrypi/board/robotech/cdfprincipal/rootfs_overlay/etc/init.d/S50chef

42 lines
537 B
Plaintext
Raw Permalink Normal View History

2018-02-07 17:57:01 +01:00
#!/bin/sh
#
# Start main program
#
2018-04-30 22:40:20 +02:00
SHELL=$(which sh)
EXECDIR=/opt/chef
EXECNAME=premier
EXECPATH=bin/$EXECNAME
2018-02-07 17:57:01 +01:00
PIDFILE=/var/run/chef.pid
start() {
printf "Starting chef: "
2018-04-30 22:40:20 +02:00
cd "$EXECDIR"; /sbin/start-stop-daemon -p "$PIDFILE" -x "$EXECPATH" -b -m -S
echo "OK"
2018-02-07 17:57:01 +01:00
}
stop() {
printf "Stopping chef: "
2018-04-30 22:40:20 +02:00
/sbin/start-stop-daemon -x "$EXECPATH" -K
/opt/chef/lcdOff.sh
2018-02-07 17:57:01 +01:00
echo "OK"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?