Skip to content

Instantly share code, notes, and snippets.

@kostoww
Created May 10, 2020 10:54
Show Gist options
  • Save kostoww/d227acae296c48f48fb1fe12cf4557b4 to your computer and use it in GitHub Desktop.
Save kostoww/d227acae296c48f48fb1fe12cf4557b4 to your computer and use it in GitHub Desktop.
[BarracudaVPN start/stop script] Manage barracudavpn without entering passwords #scripts
#!/bin/bash
CERT_PASS=mycert
USER_LOGIN=y508825
USER_PWD=pass
startme() {
barracudavpn --start --keypwd ${CERT_PASS} --login ${USER_LOGIN} --serverpwd ${USER_PWD}
}
stopme() {
barracudavpn --stop --keypwd ${CERT_PASS} --login ${USER_LOGIN} --serverpwd ${USER_PWD}
barracudavpn --stop --keypwd ${CERT_PASS} --login ${USER_LOGIN} --serverpwd ${USER_PWD}
}
pingme() {
barracudavpn --status
}
case "$1" in
start) startme ; pingme ;;
stop) stopme ; pingme ;;
status) pingme ;;
restart) stopme; startme; pingme ;;
*) echo "usage: $0 start|status|stop|restart" >&2
exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment