aboutsummaryrefslogtreecommitdiffstats
path: root/main/tinc/tincd.lo.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-12-10 20:04:19 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-10 20:04:19 +0000
commitb70d422361400cc6a43c322e9f446dc2b3791504 (patch)
tree08a86d44c040996449053eaf8f01c1a3754bd3f5 /main/tinc/tincd.lo.initd
parent0cfedfd014e9681c080967c74baac1290365ae46 (diff)
downloadaports-b70d422361400cc6a43c322e9f446dc2b3791504.tar.bz2
aports-b70d422361400cc6a43c322e9f446dc2b3791504.tar.xz
main/tinc: renamed
Diffstat (limited to 'main/tinc/tincd.lo.initd')
-rw-r--r--main/tinc/tincd.lo.initd46
1 files changed, 46 insertions, 0 deletions
diff --git a/main/tinc/tincd.lo.initd b/main/tinc/tincd.lo.initd
new file mode 100644
index 0000000000..79c185b381
--- /dev/null
+++ b/main/tinc/tincd.lo.initd
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/tinc/files/tincd.lo,v 1.1 2010/07/18 10:04:56 dragonheart Exp $
+
+opts="reload"
+
+depend()
+{
+ use logger dns
+ need net
+}
+
+start()
+{
+ TINCNET=${RC_SVCNAME#*.}
+ if [ -f /etc/tinc/"$TINCNET"/tinc.conf ] ; then
+ ebegin "Starting tinc network $TINCNET"
+ /usr/sbin/tincd --debug=1 --net="$TINCNET" --logfile=/var/log/tinc.$TINCNET.log --pidfile=/var/run/tinc.$TINCNET.pid
+ eend $?
+ else
+ eerror "Cannot start network $TINCNET, /etc/tinc/$TINCNET/tinc.conf does not exist !"
+ fi
+}
+
+stop()
+{
+ TINCNET=${RC_SVCNAME#*.}
+ if [ -f /var/run/tinc."$TINCNET".pid ] ; then
+ ebegin "Stopping tinc network $TINCNET"
+ /usr/sbin/tincd --kill --pidfile=/var/run/tinc."$TINCNET".pid
+ eend $?
+ else
+ eerror "Cannot start network $TINCNET, /etc/tinc/$TINCNET/tinc.conf does not exist !"
+ fi
+}
+
+reload()
+{
+ TINCNET=${RC_SVCNAME#*.}
+ if [ -f /var/run/tinc."$TINCNET".pid ] ; then
+ ebegin "Reloading configuration for tinc network $TINCNET"
+ /usr/sbin/tincd --kill HUP --pidfile=/var/run/tinc."$TINCNET".pid
+ eend $?
+ fi
+}