From 976aa03f8b1f317f20d3dfee8441907c9b97dbb6 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sun, 31 May 2020 22:29:34 +0900 Subject: [PATCH] Update IPsec startup and shutdown script --- docker/l2tp/ipsec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docker/l2tp/ipsec b/docker/l2tp/ipsec index 833ea14..6c2764c 100644 --- a/docker/l2tp/ipsec +++ b/docker/l2tp/ipsec @@ -24,7 +24,7 @@ # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. See . +# option) any later version. See . # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -71,17 +71,15 @@ fi # where the private directory and the config files are IPSEC_CONF="${IPSEC_CONF:-/etc/ipsec.conf}" -IPSEC_EXECDIR="${IPSEC_EXECDIR:-/usr/lib/ipsec}" +IPSEC_EXECDIR="${IPSEC_EXECDIR:-/usr/libexec/ipsec}" IPSEC_SBINDIR="${IPSEC_SBINDIR:-/usr/sbin}" unset PLUTO_OPTIONS -rundir=/var/run/pluto +rundir=/run/pluto plutopid=${rundir}/pluto.pid plutoctl=${rundir}/pluto.ctl lockdir=/var/lock/subsys lockfile=${lockdir}/ipsec -ipsecversion=/proc/net/ipsec_version -kamepfkey=/proc/net/pfkey # /etc/resolv.conf related paths LIBRESWAN_RESOLV_CONF=${rundir}/libreswan-resolv-conf-backup @@ -144,6 +142,9 @@ start() { rm -f ${lockfile} fi echo + if [ -f /usr/libexec/ipsec/portexcludes ] ; then + /usr/libexec/ipsec/portexcludes + fi return ${RETVAL} } @@ -301,4 +302,4 @@ case "$1" in RETVAL=2 esac -exit ${RETVAL} \ No newline at end of file +exit ${RETVAL}