From 5894ea2e1f0a5ba3c021c442e75f1e603e4c5180 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sat, 30 May 2020 17:35:27 -0500 Subject: [PATCH] Update IKEv2 script - Allow running from inside a container, so that it can be used with: https://github.com/hwdsl2/docker-ipsec-vpn-server --- extras/ikev2setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/ikev2setup.sh b/extras/ikev2setup.sh index 365c24a..38e1d9c 100644 --- a/extras/ikev2setup.sh +++ b/extras/ikev2setup.sh @@ -35,7 +35,7 @@ fi ipsec_ver=$(/usr/local/sbin/ipsec --version 2>/dev/null) swan_ver=$(printf '%s' "$ipsec_ver" | sed -e 's/Linux //' -e 's/Libreswan //' -e 's/ (netkey) on .*//') -if ! grep -qs "hwdsl2 VPN script" /etc/sysctl.conf \ +if ( ! grep -qs "hwdsl2 VPN script" /etc/sysctl.conf && ! grep -qs "hwdsl2" /opt/src/run.sh ) \ || ! printf '%s' "$ipsec_ver" | grep -q "Libreswan" \ || [ ! -f "/etc/ppp/chap-secrets" ] || [ ! -f "/etc/ipsec.d/passwd" ]; then cat 1>&2 <<'EOF'