Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. username="user@hostname"
  4. password="your-Complex-password"
  5. url="Your-URL"
  6. pidfile="/tmp/openconnect-pid"
  7.  
  8.  
  9. case "$1" in
  10. start)
  11. echo "$password" | openconnect -b --pid-file=$pidfile --user=$username $url &
  12. ;;
  13. stop)
  14. cat $pidfile | xargs kill -2
  15. exit 1
  16. ;;
  17. *)
  18. echo "$0 <start|stop>"
  19. exit 1
  20. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement