From f46ef57b5e51b5361ab8b56b938ef3b4575f401b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 11 May 2015 15:15:14 +0200 Subject: [PATCH] post-merge: prefer the tinc1.1 cli over invoke-rc.d if it exists --- scripts/post-merge | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/post-merge b/scripts/post-merge index b70396a..f7880de 100755 --- a/scripts/post-merge +++ b/scripts/post-merge @@ -7,6 +7,8 @@ # 3. create cronjob running "git pull -q -C /etc/tinc/icvpn/" # +PATH=/usr/sbin:$PATH + fail() { echo "$1" >&2 exit 1 @@ -25,6 +27,11 @@ while read HOST; do echo "ConnectTo = $HOST" >> $TINCCFG done < metanodes -/usr/sbin/invoke-rc.d tinc reload icvpn +if hash tinc; then + # prefer the command line interface that comes with tinc1.1 if it exists + tinc -n icvpn reload +else + invoke-rc.d tinc reload icvpn +fi exit 0