mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2024-11-15 12:56:07 +01:00
38 lines
415 B
Plaintext
38 lines
415 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# Start extra services when not in debug mode
|
||
|
#
|
||
|
|
||
|
start() {
|
||
|
printf "Starting extra services: "
|
||
|
if ! /opt/cdf/bin/testpin 0 1
|
||
|
then
|
||
|
/etc/extra.d/rcS
|
||
|
fi
|
||
|
echo "OK"
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
printf "Stopping extra services: "
|
||
|
/etc/extra.d/rcK
|
||
|
echo "OK"
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
start
|
||
|
;;
|
||
|
stop)
|
||
|
stop
|
||
|
;;
|
||
|
restart|reload)
|
||
|
stop
|
||
|
start
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {start|stop|restart}"
|
||
|
exit 1
|
||
|
esac
|
||
|
|
||
|
exit $?
|