From 3dcaea9067dcaa28ef934f1d02a31f0e676eccd8 Mon Sep 17 00:00:00 2001 From: IcedComputer <31418197+IcedComputer@users.noreply.github.com> Date: Fri, 18 Oct 2019 21:09:54 -0700 Subject: [PATCH] Check if -i iOS can be used the -i iOS function is not compatible with OVPN 2.4. This change checks to ensure that the user is not using this version before attempting to create an OVPN12 file. --- scripts/makeOVPN.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/makeOVPN.sh b/scripts/makeOVPN.sh index 406aff0..a75cb8e 100755 --- a/scripts/makeOVPN.sh +++ b/scripts/makeOVPN.sh @@ -70,7 +70,13 @@ do DAYS="$_val" ;; -i|--iOS) - iOS=1 + OVPN12_Compatible=$(cat /etc/pivpn/OVPN12_Compatible) + if [[ ${OVPN12_Compatible} == "true" ]]; then + iOS=1 + else + echo "This function is not compatable with OVPN 2.4" + exit 1 + fi ;; -h|--help) helpFunc