From e9954a7af7399edb3071dd3d67e97a189af4ce06 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 22 Nov 2019 14:03:50 +0000 Subject: [PATCH] Adds -o,--openvpn install option. Resolves #436 --- installers/raspbian.sh | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/installers/raspbian.sh b/installers/raspbian.sh index 5aeeb9d8..bc0915c8 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -6,13 +6,15 @@ # # Command-line options: # -y, --yes, --assume-yes -# Assume "yes" as answer to all prompts and run non-interactively +# Assume "yes" as answer to all prompts and run non-interactively # c, --cert, --certficate -# Installs mkcert and generates an SSL certificate for lighttpd -# -r, --repo, --repository -# Overrides the default GitHub repo (billz/raspap-webgui) -# -b, --branch -# Overrides the default git branch (master) +# Installs mkcert and generates an SSL certificate for lighttpd +# -o, --openvpn +# Used with -y, --yes, sets OpenVPN install option (0=no install) +# # -r, --repo, --repository +# Overrides the default GitHub repo (billz/raspap-webgui) +# -b, --branch +# Overrides the default git branch (master) repo="billz/raspap-webgui" branch="master" @@ -20,11 +22,13 @@ usage=$(cat << EOF Usage: raspbian.sh [OPTION]\n -y, --yes, --assume-yes\n\tAssumes "yes" as an answer to all prompts -c, --cert, --certficate\n\tInstalls an SSL certificate for lighttpd --r, --repo, --repository\n\tOverrides the default GitHub repo (billz/raspap-webgui) --b, --branch\n\tOverrides the default git branch (master)\n +-o, --openvpn \n\tUsed with -y, --yes, sets OpenVPN install option (0=no install) +-r, --repo, --repository \n\tOverrides the default GitHub repo (billz/raspap-webgui) +-b, --branch \n\tOverrides the default git branch (master)\n EOF ) assume_yes=0 +ovpn_option=1 while :; do case $1 in @@ -32,6 +36,10 @@ while :; do assume_yes=1 apt_option="-y" ;; + -o|--openvpn) + ovpn_option="$2" + shift + ;; -c|--cert|--certificate) install_cert=1 ;; @@ -41,6 +49,7 @@ while :; do ;; -b|--branch) branch="$2" + shift ;; -h|--help) printf "$usage"