Created
May 10, 2020 10:54
-
-
Save kostoww/d227acae296c48f48fb1fe12cf4557b4 to your computer and use it in GitHub Desktop.
[BarracudaVPN start/stop script] Manage barracudavpn without entering passwords #scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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