more check in debug script
This commit is contained in:
parent
985effbd7c
commit
c4039d5191
20
tinc-debug
20
tinc-debug
@ -1,14 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
if [ -z "$BASH" ]; then
|
||||
echo "All vpn scripts requires bash!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -eu
|
||||
|
||||
die() {
|
||||
echo $1 &>2
|
||||
exit 1
|
||||
}
|
||||
warn() {
|
||||
echo $1 &>2
|
||||
}
|
||||
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
if [ ! -f "$DIR/ed25519_key.priv" ]; then
|
||||
warn "No ed25519_key.priv found!"
|
||||
fi
|
||||
|
||||
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 ..."
|
||||
|
Loading…
Reference in New Issue
Block a user