1
0
mirror of synced 2024-11-22 13:06:02 +03:00

Update IKEv2 script

- Allow running from inside a container, so that it can be used with:
  https://github.com/hwdsl2/docker-ipsec-vpn-server
This commit is contained in:
hwdsl2 2020-05-30 17:35:27 -05:00
parent 60d89c7181
commit 5894ea2e1f

View File

@ -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'