dlan        14/07/17 05:47:19

  Modified:             tincd.conf
  Added:                tincd-r1
  Log:
  bump version 1.1, rework init.d script
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
0xAABEFD55)

Revision  Changes    Path
1.4                  net-misc/tinc/files/tincd.conf

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tinc/files/tincd.conf?rev=1.4&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tinc/files/tincd.conf?rev=1.4&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tinc/files/tincd.conf?r1=1.3&r2=1.4

Index: tincd.conf
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-misc/tinc/files/tincd.conf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- tincd.conf  24 Apr 2013 11:19:53 -0000      1.3
+++ tincd.conf  17 Jul 2014 05:47:19 -0000      1.4
@@ -3,3 +3,18 @@
 #If you want tincd to log to syslog, then set this to "yes"
 #Anything else and tincd will log to /var/log/tinc.NETNAME.log.
 SYSLOG="yes"
+
+#Set debug level, useful for error probe
+# 0  Quiet mode, only show starting/stopping of the daemon
+# 1  Show (dis)connects of other tinc daemons via TCP
+# 2  Show error messages received from other hosts
+# 2  Show status messages received from other hosts
+# 3  Show the requests that are sent/received
+# 4  Show contents of every request that is sent/received
+# 5  Show network traffic information
+# 6  Show contents of each packet that is being sent/received
+# 10 You have been warned
+DEBUG_LEVEL="0"
+
+#Extra Options, if you want addtional customization
+EXTRA_OPTS=""



1.1                  net-misc/tinc/files/tincd-r1

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tinc/files/tincd-r1?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tinc/files/tincd-r1?rev=1.1&content-type=text/plain

Index: tincd-r1
===================================================================
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/tinc/files/tincd-r1,v 1.1 
2014/07/17 05:47:19 dlan Exp $

extra_started_commands="reload"

NETS="/etc/conf.d/tinc.networks"
DAEMON="/usr/sbin/tincd"

depend() {
        use logger dns
        need net
}

checkconfig() {
        if [ "${RC_SVCNAME}"  == "tincd" ] ; then
                ALL_NETNAME="$(awk '/^ *NETWORK:/ { print $2 }' "${NETS}")"
        else
                ALL_NETNAME="${RC_SVCNAME#*.}"
        fi
        # warn this if still not found
        if [ -z "${ALL_NETNAME}" ] ; then
                eerror "No VPN networks configured in ${NETS}"
                return 1
        fi
        return 0
}

start() {
        ebegin "Starting tinc VPN networks"
        checkconfig || return 1
        for NETNAME in ${ALL_NETNAME}
        do
                CONFIG="/etc/tinc/${NETNAME}/tinc.conf"
                PIDFILE="/var/run/tinc.${NETNAME}.pid"
                if [ ! -f "${CONFIG}" ]; then
                        eerror "Cannot start network ${NETNAME}."
                        eerror "Please set up ${CONFIG} !"
                else
                        ebegin "Starting tinc network ${NETNAME}"
                        if [ "${SYSLOG}" == "yes" ]; then
                                LOG=""
                        else
                                LOG="--logfile=/var/log/tinc.${NETNAME}.log"
                        fi
                        start-stop-daemon --start --exec "${DAEMON}" --pidfile 
"${PIDFILE}" -- --net="${NETNAME}" ${LOG} --pidfile "${PIDFILE}" 
--debug="${DEBUG_LEVEL}" ${EXTRA_OPTS}
                        eend $?
                fi
        done
}

stop() {
        ebegin "Stopping tinc VPN networks"
        checkconfig || return 1
        for NETNAME in ${ALL_NETNAME}
        do
                PIDFILE="/var/run/tinc.${NETNAME}.pid"
                if [ -f "${PIDFILE}" ]; then
                        ebegin "Stopping tinc network ${NETNAME}"
                        start-stop-daemon --stop --pidfile "${PIDFILE}"
                        eend $?
                fi
        done
}

reload() {
        ebegin "Reloading configuration for tinc VPN networks"
        checkconfig || return 1
        for NETNAME in ${ALL_NETNAME}
        do
                PIDFILE="/var/run/tinc.${NETNAME}.pid"
                if [ -f "${PIDFILE}" ]; then
                        ebegin "Reloading tinc network ${NETNAME}"
                        start-stop-daemon --signal HUP --pidfile ${PIDFILE}
                        eend $?
                fi
        done
}




Reply via email to