diff options
author | Kevin Scranton <kevin@nwabytes.com> | 2017-09-10 13:18:24 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-09-10 13:22:44 +0700 |
commit | 6007ad68616fee231d8284f4c0bc2a6b2e00800a (patch) | |
tree | 96c250a3bc919b4e067b6eb8ecdfd23bd8142ad3 /network/tinc/rc.tinc | |
parent | a71fcd77144c187a70ae34d8829ff5e2bbe8b6d6 (diff) |
network/tinc: Updated for version 1.0.32.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/tinc/rc.tinc')
-rw-r--r-- | network/tinc/rc.tinc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/network/tinc/rc.tinc b/network/tinc/rc.tinc new file mode 100644 index 000000000000..d163c22973b4 --- /dev/null +++ b/network/tinc/rc.tinc @@ -0,0 +1,40 @@ +#!/bin/sh + +VPNS=$(ls /etc/tinc) + +start () { + for VPN in $VPNS; do + echo "Starting tinc daemon for $VPN..." + /usr/sbin/tincd -n "$VPN" -d1 --logfile=/var/log/tinc."$VPN" + done +} + +stop () { + for VPN in $VPNS; do + echo "Stopping tinc daemon for $VPN..." + /usr/sbin/tincd -n "$VPN" -k + done +} + +restart () { + stop + sleep 1 + start +} + +case "$1" in + ("start") + start + ;; + ("stop") + stop + ;; + ("restart") + restart + ;; + (*) + echo "Usage: $0 <start|stop|restart>" + exit 1 +esac + +exit 0 |