Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- username="user@hostname"
- password="your-Complex-password"
- url="Your-URL"
- pidfile="/tmp/openconnect-pid"
- case "$1" in
- start)
- echo "$password" | openconnect -b --pid-file=$pidfile --user=$username $url &
- ;;
- stop)
- cat $pidfile | xargs kill -2
- exit 1
- ;;
- *)
- echo "$0 <start|stop>"
- exit 1
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement