Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. . /etc/rc.conf
  4. . /etc/rc.d/functions
  5.  
  6. case $1 in
  7. start)
  8. stat_busy "Starting Wifi..."
  9.  
  10. ifconfig wlan0 up
  11. ifconfig wlan0 192.168.13.203
  12. # -d pour avoir les logs, -B pour background
  13. wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext
  14. dhcpcd wlan0
  15.  
  16. add_daemon mywifi
  17. stat_done
  18. ;;
  19. stop)
  20. stat_busy "Stopping Wifi..."
  21.  
  22. killall wpa_supplicant
  23. ifconfig wlan0 down
  24.  
  25. rm_daemon mywifi
  26. stat_done
  27. ;;
  28. restart)
  29. $0 stop
  30. sleep 1
  31. $0 start
  32. ;;
  33. *)
  34. echo "usage: $0 {start|stop|restart}"
  35. esac
  36. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement