mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2024-11-15 12:56:07 +01:00
35 lines
410 B
Plaintext
35 lines
410 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# Loads required hardware modules
|
||
|
#
|
||
|
|
||
|
start() {
|
||
|
printf "Starting hardware handling: "
|
||
|
modprobe pl2303 # USB↔Serial cable
|
||
|
echo "OK"
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
printf "Stopping hardware handling: "
|
||
|
rmmod pl2303 # USB↔Serial cable
|
||
|
echo "OK"
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
start
|
||
|
;;
|
||
|
stop)
|
||
|
stop
|
||
|
;;
|
||
|
restart|reload)
|
||
|
stop
|
||
|
start
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {start|stop|restart}"
|
||
|
exit 1
|
||
|
esac
|
||
|
|
||
|
exit $?
|