Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- . /etc/rc.conf
- . /etc/rc.d/functions
- case $1 in
- start)
- stat_busy "Starting Wifi..."
- ifconfig wlan0 up
- ifconfig wlan0 192.168.13.203
- # -d pour avoir les logs, -B pour background
- wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext
- dhcpcd wlan0
- add_daemon mywifi
- stat_done
- ;;
- stop)
- stat_busy "Stopping Wifi..."
- killall wpa_supplicant
- ifconfig wlan0 down
- rm_daemon mywifi
- stat_done
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
- esac
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement