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:
parent
60d89c7181
commit
5894ea2e1f
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user