This commit is contained in:
Gordon Grant-Stuart 2022-12-05 22:08:13 +00:00
parent 05a8035f70
commit 94b160d33a

View File

@ -6,16 +6,11 @@ BASEDIR="${REALPATH%/*}"
rm $BASEDIR/var/*.conf &>/dev/null # Create separate .conf files in var/ from etc/tunnelkeeper.conf
awk -v "dir=$BASEDIR/var" '
/^\[/ {sec=$1; gsub("[\[\]]","",sec)}
!/^\[/ {print >> dir"/"sec".conf"}' < $BASEDIR/etc/tunnelkeeper.conf
!/^\[/ {print >> dir"/"sec".conf"}' < $BASEDIR/etc/tunnelkeeper.conf &>/dev/null
SSHCONF="$BASEDIR/var/ssh.conf"
TKCONF="$BASEDIR/var/settings.conf"
if [[ ! -f "$SSHCONF" ]]; then
echo "Config file \"$SSHCONF\" does not exist"
exit 1
fi
function ruroot () {
if [[ $UID -ne 0 ]]; then
echo "You must be root to do this"