Avoid proxy for bypass_socket, enable_udp_decap
[strongswan.git] / src / ipsec / _ipsec.in
index 2acf5a3..3742b12 100644 (file)
@@ -18,6 +18,9 @@
 PATH="/sbin:/bin:/usr/sbin:/usr/bin:@IPSEC_SBINDIR@"
 export PATH
 
 PATH="/sbin:/bin:/usr/sbin:/usr/bin:@IPSEC_SBINDIR@"
 export PATH
 
+# set daemon name
+[ -z "$DAEMON_NAME" ] && DAEMON_NAME="charon"
+
 # name and version of the ipsec implementation
 OS_NAME=`uname -s`
 IPSEC_NAME="@IPSEC_NAME@"
 # name and version of the ipsec implementation
 OS_NAME=`uname -s`
 IPSEC_NAME="@IPSEC_NAME@"
@@ -30,8 +33,8 @@ IPSEC_CONFDIR="@IPSEC_CONFDIR@"
 IPSEC_PIDDIR="@IPSEC_PIDDIR@"
 IPSEC_SCRIPT="@IPSEC_SCRIPT@"
 
 IPSEC_PIDDIR="@IPSEC_PIDDIR@"
 IPSEC_SCRIPT="@IPSEC_SCRIPT@"
 
-IPSEC_STARTER_PID="${IPSEC_PIDDIR}/starter.pid"
-IPSEC_CHARON_PID="${IPSEC_PIDDIR}/charon.pid"
+IPSEC_STARTER_PID="${IPSEC_PIDDIR}/starter.${DAEMON_NAME}.pid"
+IPSEC_CHARON_PID="${IPSEC_PIDDIR}/${DAEMON_NAME}.pid"
 
 IPSEC_STROKE="${IPSEC_DIR}/stroke"
 IPSEC_STARTER="${IPSEC_DIR}/starter"
 
 IPSEC_STROKE="${IPSEC_DIR}/stroke"
 IPSEC_STARTER="${IPSEC_DIR}/starter"
@@ -60,6 +63,7 @@ case "$1" in
        echo "  listcacerts|listaacerts|listocspcerts [--utc]"
        echo "  listacerts|listgroups|listcainfos [--utc]"
        echo "  listcrls|listocsp|listcards|listplugins|listall [--utc]"
        echo "  listcacerts|listaacerts|listocspcerts [--utc]"
        echo "  listacerts|listgroups|listcainfos [--utc]"
        echo "  listcrls|listocsp|listcards|listplugins|listall [--utc]"
+       echo "  listcounters|resetcounters [name]"
        echo "  leases [<poolname> [<address>]]"
        echo "  rereadsecrets|rereadgroups"
        echo "  rereadcacerts|rereadaacerts|rereadocspcerts"
        echo "  leases [<poolname> [<address>]]"
        echo "  rereadsecrets|rereadgroups"
        echo "  rereadcacerts|rereadaacerts|rereadocspcerts"
@@ -152,7 +156,7 @@ listacerts|listgroups|listocspcerts|\
 listcainfos|listcrls|listocsp|listall|\
 rereadsecrets|rereadcacerts|rereadaacerts|\
 rereadacerts|rereadocspcerts|rereadcrls|\
 listcainfos|listcrls|listocsp|listall|\
 rereadsecrets|rereadcacerts|rereadaacerts|\
 rereadacerts|rereadocspcerts|rereadcrls|\
-rereadall|purgeocsp)
+rereadall|purgeocsp|listcounters|resetcounters)
        op="$1"
        rc=7
        shift
        op="$1"
        rc=7
        shift
@@ -219,7 +223,7 @@ start)
        if [ -d /var/lock/subsys ]; then
                touch /var/lock/subsys/ipsec
        fi
        if [ -d /var/lock/subsys ]; then
                touch /var/lock/subsys/ipsec
        fi
-       exec $IPSEC_STARTER "$@"
+       exec $IPSEC_STARTER --daemon $DAEMON_NAME "$@"
        ;;
 status|statusall)
        op="$1"
        ;;
 status|statusall)
        op="$1"