aboutsummaryrefslogtreecommitdiffstats
path: root/main/tinc/tincd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/tinc/tincd.initd')
-rw-r--r--main/tinc/tincd.initd7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/tinc/tincd.initd b/main/tinc/tincd.initd
index 6ed1bef957..c302f4fe0c 100644
--- a/main/tinc/tincd.initd
+++ b/main/tinc/tincd.initd
@@ -4,6 +4,7 @@
# $Header: /var/cvsroot/gentoo-x86/net-misc/tinc/files/tincd,v 1.5 2008/04/01 14:08:45 dragonheart Exp $
extra_started_commands="reload"
+daemon=/usr/sbin/tincd
depend() {
use logger dns
@@ -29,7 +30,7 @@ start() {
eerror "Cannot start network $TINCNET, /etc/tinc/$TINCNET/tinc.conf does not exist !"
else
ebegin "Starting tinc network $TINCNET"
- /usr/sbin/tincd --net="$TINCNET" --logfile=/var/log/tinc.$TINCNET.log --pidfile=/var/run/tinc.$TINCNET.pid
+ $daemon --net="$TINCNET" --logfile=/var/log/tinc.$TINCNET.log --pidfile=/var/run/tinc.$TINCNET.pid
eend $?
fi
done
@@ -43,7 +44,7 @@ stop() {
if [ -f /var/run/tinc."$TINCNET".pid ]
then
ebegin "Stopping tinc network $TINCNET"
- /usr/sbin/tincd --kill --pidfile=/var/run/tinc."$TINCNET".pid
+ start-stop-daemon --stop --quiet --pidfile=/var/run/tinc.$TINCNET.pid --exec ${daemon}
eend $?
fi
done
@@ -57,7 +58,7 @@ reload() {
if [ -f /var/run/tinc."$TINCNET".pid ]
then
ebegin "Reloading tinc network $TINCNET"
- /usr/sbin/tincd --kill HUP --pidfile=/var/run/tinc."$TINCNET".pid
+ kill -1 $(awk '{ print $1 }' /var/run/tinc."$TINCNET".pid)
eend $?
fi
done