tinc-debug: set debug environment variable
This commit is contained in:
parent
451f85a95b
commit
af812755bc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user