1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-11-01 03:02:35 +00:00

Update wireguard-install.sh

This commit is contained in:
liberodark 2019-12-18 14:25:48 +01:00 committed by GitHub
parent 5e89619f47
commit 0d40ac2460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,36 +30,6 @@ usage ()
echo "-h: Show help" echo "-h: Show help"
} }
parse_args ()
{
while [ $# -ne 0 ]
do
case "${1}" in
-install)
shift
arg_install_wg >&2
;;
-remove)
shift
remove_wg >&2
;;
-h|--help)
usage
exit 0
;;
*)
echo "Invalid argument : ${1}" >&2
usage >&2
exit 1
;;
esac
shift
done
}
parse_args "$@"
detect_bad(){ detect_bad(){
if [ "$(systemd-detect-virt)" == "openvz" ]; then if [ "$(systemd-detect-virt)" == "openvz" ]; then
echo "OpenVZ is not supported" echo "OpenVZ is not supported"
@ -274,3 +244,33 @@ options
install_wg install_wg
configure_wg configure_wg
} }
parse_args ()
{
while [ $# -ne 0 ]
do
case "${1}" in
-install)
shift
arg_install_wg >&2
;;
-remove)
shift
remove_wg >&2
;;
-h|--help)
usage
exit 0
;;
*)
echo "Invalid argument : ${1}" >&2
usage >&2
exit 1
;;
esac
shift
done
}
parse_args "$@"