tinc-debug: set debug environment variable

This commit is contained in:
Jörg Thalheim 2015-02-19 09:37:49 +01:00
parent 451f85a95b
commit af812755bc

View File

@ -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