2018-04-04 16:17:13 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Loads required hardware modules
|
|
|
|
#
|
|
|
|
|
|
|
|
start() {
|
|
|
|
printf "Starting hardware handling: "
|
2018-05-08 19:20:17 +02:00
|
|
|
modprobe cdc_acm # Arduino
|
2018-04-29 21:57:29 +02:00
|
|
|
modprobe pl2303 # USB↔Serial cable
|
2018-05-05 15:56:39 +02:00
|
|
|
# I2C
|
|
|
|
modprobe i2c-bcm2708 # RPi2
|
|
|
|
modprobe i2c-bcm2835 # RPi3
|
|
|
|
modprobe i2c-dev # Both
|
2018-04-30 22:40:20 +02:00
|
|
|
/opt/chef/lcdOff.sh
|
2018-04-04 16:17:13 +02:00
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
printf "Stopping hardware handling: "
|
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stop
|
|
|
|
;;
|
|
|
|
restart|reload)
|
|
|
|
stop
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|