tinc - logging

Yazeed Fataar yazeedfataar at gmail.com
Thu Feb 25 09:10:51 CET 2016


Hi

How do I enable logging in tincd to autolog to syslog file. I know how to
run it from runtime by using this command.

tincd -n mynet --logfile=/var/log/tinc.mynet.log

But how do I include in startup script?

This is the default startup script which was created and I believe it reads
the "nets.boot" file.

"Output Omitted"
root at ubuntusrv:~# cat /etc/init.d/tinc
#! /bin/sh
#
### BEGIN INIT INFO
# Provides:          tinc
# Required-Start:    $remote_fs $network
# Required-Stop:     $remote_fs $network
# Should-Start:      $syslog $named
# Should-Stop:       $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start tinc daemons
# Description:       Create a file $NETSFILE (/etc/tinc/nets.boot),
#                    and put all the names of the networks in there.
#                    These names must be valid directory names under
#                    $TCONF (/etc/tinc). Lines starting with a # will be
#                    ignored in this file.
### END INIT INFO
#
# Based on Lubomir Bulej's Redhat init script.

. /lib/lsb/init-functions

DAEMON="/usr/sbin/tincd"
NAME="tinc"
DESC="tinc daemons"
TCONF="/etc/tinc"
NETSFILE="$TCONF/nets.boot"
NETS=""

test -f $DAEMON || exit 0

[ -r /etc/default/tinc ] && . /etc/default/tinc

# foreach_net "what-to-say" action [arguments...]
foreach_net() {
  if [ ! -f $NETSFILE ] ; then
    echo "Please create $NETSFILE."
    exit 0
  fi
  echo -n "$1"
  shift
  egrep '^[ ]*[a-zA-Z0-9_-]+' $NETSFILE | while read net args; do
    echo -n " $net"
    "$@" $net $args
  done
  echo "."
}



Regards
Yazeed Fataar
<yazeedfataar at hotmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20160225/2850db66/attachment.html>


More information about the tinc mailing list