From af812755bc90916edbfacaffe0c6921efc42decf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 19 Feb 2015 09:37:49 +0100 Subject: [PATCH] tinc-debug: set debug environment variable --- tinc-debug | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tinc-debug b/tinc-debug index bab88f1..fb861ed 100755 --- a/tinc-debug +++ b/tinc-debug @@ -25,14 +25,17 @@ if [ ! -f "$DIR/rsa_key.priv" ]; then warn "No rsa_key.priv found!" fi + + if [[ $EUID -ne 0 ]]; then if has sudo; then echo "Start tinc. Cancel with Ctrl+C ..." - sudo tincd -c "$DIR" -D -d + sudo TINC_DEBUG=1 tincd -c "$DIR" -D -d else die "run this script as root" fi else echo "Start tinc. Cancel with Ctrl+C ..." + export TINC_DEBUG=1 tincd -c "$DIR" -D -d fi