mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Adds -o,--openvpn <flag> install option. Resolves #436
This commit is contained in:
parent
a06de39da2
commit
e9954a7af7
@ -6,13 +6,15 @@
|
|||||||
#
|
#
|
||||||
# Command-line options:
|
# Command-line options:
|
||||||
# -y, --yes, --assume-yes
|
# -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
|
# c, --cert, --certficate
|
||||||
# Installs mkcert and generates an SSL certificate for lighttpd
|
# Installs mkcert and generates an SSL certificate for lighttpd
|
||||||
# -r, --repo, --repository
|
# -o, --openvpn <flag>
|
||||||
# Overrides the default GitHub repo (billz/raspap-webgui)
|
# Used with -y, --yes, sets OpenVPN install option (0=no install)
|
||||||
# -b, --branch
|
# # -r, --repo, --repository <name>
|
||||||
# Overrides the default git branch (master)
|
# Overrides the default GitHub repo (billz/raspap-webgui)
|
||||||
|
# -b, --branch <name>
|
||||||
|
# Overrides the default git branch (master)
|
||||||
|
|
||||||
repo="billz/raspap-webgui"
|
repo="billz/raspap-webgui"
|
||||||
branch="master"
|
branch="master"
|
||||||
@ -20,11 +22,13 @@ usage=$(cat << EOF
|
|||||||
Usage: raspbian.sh [OPTION]\n
|
Usage: raspbian.sh [OPTION]\n
|
||||||
-y, --yes, --assume-yes\n\tAssumes "yes" as an answer to all prompts
|
-y, --yes, --assume-yes\n\tAssumes "yes" as an answer to all prompts
|
||||||
-c, --cert, --certficate\n\tInstalls an SSL certificate for lighttpd
|
-c, --cert, --certficate\n\tInstalls an SSL certificate for lighttpd
|
||||||
-r, --repo, --repository\n\tOverrides the default GitHub repo (billz/raspap-webgui)
|
-o, --openvpn <flag>\n\tUsed with -y, --yes, sets OpenVPN install option (0=no install)
|
||||||
-b, --branch\n\tOverrides the default git branch (master)\n
|
-r, --repo, --repository <name>\n\tOverrides the default GitHub repo (billz/raspap-webgui)
|
||||||
|
-b, --branch <name>\n\tOverrides the default git branch (master)\n
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
assume_yes=0
|
assume_yes=0
|
||||||
|
ovpn_option=1
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
case $1 in
|
case $1 in
|
||||||
@ -32,6 +36,10 @@ while :; do
|
|||||||
assume_yes=1
|
assume_yes=1
|
||||||
apt_option="-y"
|
apt_option="-y"
|
||||||
;;
|
;;
|
||||||
|
-o|--openvpn)
|
||||||
|
ovpn_option="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-c|--cert|--certificate)
|
-c|--cert|--certificate)
|
||||||
install_cert=1
|
install_cert=1
|
||||||
;;
|
;;
|
||||||
@ -41,6 +49,7 @@ while :; do
|
|||||||
;;
|
;;
|
||||||
-b|--branch)
|
-b|--branch)
|
||||||
branch="$2"
|
branch="$2"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
printf "$usage"
|
printf "$usage"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user