mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2024-12-23 06:00:36 +01:00
39 lines
421 B
Bash
Executable file
39 lines
421 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Connect to Wi-Fi network
|
|
#
|
|
|
|
start() {
|
|
printf "Starting Wi-Fi connection: "
|
|
# modprobe brcmfmac
|
|
modprobe r8188eu
|
|
modprobe 8192cu
|
|
modprobe ar5523
|
|
ifup wlan0
|
|
echo "OK"
|
|
}
|
|
|
|
stop() {
|
|
printf "Stopping Wi-Fi connection: "
|
|
ifdown wlan0
|
|
echo "OK"
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
stop
|
|
start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|