add tinc-debug script
This commit is contained in:
parent
148d9fe0e1
commit
5852ac2650
22
tinc-debug
Executable file
22
tinc-debug
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
if [ -z "$BASH" ]; then
|
||||
echo "All vpn scripts requires bash!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
if has sudo; then
|
||||
echo "Start tinc. Cancel with Ctrl+C ..."
|
||||
sudo tincd -c "$DIR" -D -d
|
||||
else
|
||||
die "run this script as root"
|
||||
fi
|
||||
else
|
||||
echo "Start tinc. Cancel with Ctrl+C ..."
|
||||
tincd -c "$DIR" -D -d
|
||||
fi
|
Loading…
Reference in New Issue
Block a user