summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2016-07-08 00:17:20 (GMT)
committerChristian Pointner <equinox@anytun.org>2016-07-08 00:17:20 (GMT)
commit3b916162aaf4262e20e0a999a57946ac5ef012b6 (patch)
tree72de3e6a0ce5f41119aafaa61182a2698895a86e
parenta7532af01df20727b4264f40f02bad056f24bef6 (diff)
use exec @ launcher, also install control daemon systemd unit
-rwxr-xr-xusr/lib/anytun-launcher4
-rw-r--r--usr/lib/systemd/system/anytun@.service1
2 files changed, 3 insertions, 2 deletions
diff --git a/usr/lib/anytun-launcher b/usr/lib/anytun-launcher
index 49e27e0..0980bda 100755
--- a/usr/lib/anytun-launcher
+++ b/usr/lib/anytun-launcher
@@ -22,7 +22,7 @@ start_vpn () {
fi
test -d $VARRUN_DIR || mkdir -p $VARRUN_DIR
DAEMONARG=`sed 's/#.*//' < $CONFIG_DIR/$NAME/config | grep -e '\w' | sed 's/^/--/' | tr '\n' ' '`
- $DAEMON --write-pid $VARRUN_DIR/$NAME.pid $POSTUP $DAEMONOPTS $DAEMONARG
+ exec $DAEMON --write-pid $VARRUN_DIR/$NAME.pid $POSTUP $DAEMONOPTS $DAEMONARG
else
echo "no config found" >&2
return 1
@@ -41,7 +41,7 @@ start_configd () {
$ANYTUNCONFIG $DAEMONARG $CIPHER $AUTHALGO $KDPRF >> $VARCONTROL_DIR/$NAME
done
CONTROLHOST=`sed 's/#.*//' < $CONFIG_DIR/$NAME/config | grep -e 'control-host' | sed 's/^/ --/' | xargs echo`
- $CONTROLDAEMON -f $VARCONTROL_DIR/$NAME $DAEMONOPTS $CONTROLHOST \
+ exec $CONTROLDAEMON -f $VARCONTROL_DIR/$NAME $DAEMONOPTS $CONTROLHOST \
--write-pid $VARCONTROL_DIR/$NAME.pid
fi
}
diff --git a/usr/lib/systemd/system/anytun@.service b/usr/lib/systemd/system/anytun@.service
index ba2130f..a837889 100644
--- a/usr/lib/systemd/system/anytun@.service
+++ b/usr/lib/systemd/system/anytun@.service
@@ -19,3 +19,4 @@ DevicePolicy=closed
[Install]
WantedBy=multi-user.target
+Also=anytun-controld@%i.service