X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/92db0e2617cec9b118708c722c1a9f273001f87d..dac7fe82bb8d933fb3a68cb9c0256dac6f4470ae:/debian/init.d?ds=sidebyside diff --git a/debian/init.d b/debian/init.d index 3da046d..737ce46 100644 --- a/debian/init.d +++ b/debian/init.d @@ -19,6 +19,7 @@ DAEMON=/usr/sbin/l2tpns NAME=l2tpns DESC=l2tpns ARGS="-d" +ACCTDIR=$(grep "set accounting_dir" /etc/l2tpns/startup-config | sed -e 's/.* "//' -e 's/".*//') test -f $DAEMON || exit 0 @@ -27,6 +28,9 @@ set -e case "$1" in start) echo -n "Starting $DESC: " + if [ ! -d "$ACCTDIR" ]; then + mkdir -p "$ACCTDIR" + fi start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- $ARGS echo "$NAME."