Advertisement
dolapos

3g

Feb 28th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. #***************************************************
  2. #! /bin/sh
  3. # /etc/init.d/autoconnectnet
  4.  
  5. ### BEGIN INIT INFO
  6. # Provides: noip
  7. # Required-Start: $remote_fs $syslog
  8. # Required-Stop: $remote_fs $syslog
  9. # Default-Start: 2 3 4 5
  10. # Default-Stop: 0 1 6
  11. # Short-Description: Simple script to start a program at boot
  12. # Description: A simple script from www.stuffaboutcode.com which will start / stop a program a boot / shutdown.
  13. ### END INIT INFO
  14.  
  15.  
  16. case "$1" in
  17. start)
  18. sleep 10
  19. echo "connecting via sakis3g"
  20. # run application you want to start
  21. sudo /root/3g/sakis3g connect --console --interactive APN=CUSTOM_APN CUSTOM_APN='internet' APN_USER='turkcell' APN_PASS='turkcell' USBINTERFACE=3 USBDRIVER=sierra USBMODEM=12d1:1003 OTHER=USBMODEM MODEM=OTHER
  22. ;;
  23. stop)
  24. echo "dissconnecting via sakis3g"
  25. # kill application you want to stop
  26. /opt/sakis3g/sakis3g --sudo "disconnect"
  27. ;;
  28. *)
  29. echo "Usage: /etc/init.d/autoconnectnet {start|stop}"
  30. exit 1
  31. ;;
  32. esac
  33.  
  34. exit 0
  35. #*********************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement