config file changes
This commit is contained in:
parent
2b2d408e07
commit
7a21e9cf34
@ -1,12 +1,4 @@
|
|||||||
# Everything in this file obeys the same rules as ~/.ssh/config, except for the Password, Watch and Debug directives
|
# Everything in this file obeys the same rules as ~/.ssh/config, except for the Password, Watch and Debug directives
|
||||||
|
|
||||||
Host *
|
|
||||||
ExitOnForwardFailure yes
|
|
||||||
TCPKeepAlive yes
|
|
||||||
ServerAliveInterval 15
|
|
||||||
ServerAliveCountMax 3
|
|
||||||
ControlMaster auto
|
|
||||||
StrictHostKeyChecking no
|
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
#
|
#
|
||||||
|
|||||||
14
tunnelkeeper
14
tunnelkeeper
@ -10,7 +10,17 @@ DEBUGCONF="$BASEDIR/var/debug.conf"
|
|||||||
|
|
||||||
function genconfig () {
|
function genconfig () {
|
||||||
mkdir -p "$BASEDIR/var"
|
mkdir -p "$BASEDIR/var"
|
||||||
cat "$BASEDIR/etc/tunnelkeeper.conf" | grep -Eiv '^ *(watch|password|debug)' > "$SSHCONF"
|
cat <<EOF > "$SSHCONF"
|
||||||
|
Host *
|
||||||
|
ExitOnForwardFailure yes
|
||||||
|
TCPKeepAlive yes
|
||||||
|
ServerAliveInterval 15
|
||||||
|
ServerAliveCountMax 3
|
||||||
|
ControlMaster auto
|
||||||
|
StrictHostKeyChecking no
|
||||||
|
|
||||||
|
EOF
|
||||||
|
cat "$BASEDIR/etc/tunnelkeeper.conf" | grep -Eiv '^ *(watch|password|debug)' >> "$SSHCONF"
|
||||||
cat "$BASEDIR/etc/tunnelkeeper.conf" | grep -Ei '^( *watch|Host)' | awk '{print $1 " " $2}' | grep -i -B1 --no-group-separator watch | tr '\n' ' ' | sed 's/Host /\n/g; s/ *[Ww]atch//g' > "$WATCHCONF"
|
cat "$BASEDIR/etc/tunnelkeeper.conf" | grep -Ei '^( *watch|Host)' | awk '{print $1 " " $2}' | grep -i -B1 --no-group-separator watch | tr '\n' ' ' | sed 's/Host /\n/g; s/ *[Ww]atch//g' > "$WATCHCONF"
|
||||||
cat "$BASEDIR/etc/tunnelkeeper.conf" | grep -Ei '^( *password|Host)' | awk '{print $1 " " $2}' | grep -i -B1 --no-group-separator password | tr '\n' ' ' | sed 's/Host /\n/g; s/ *[Pp]assword//g' > "$PWCONF"
|
cat "$BASEDIR/etc/tunnelkeeper.conf" | grep -Ei '^( *password|Host)' | awk '{print $1 " " $2}' | grep -i -B1 --no-group-separator password | tr '\n' ' ' | sed 's/Host /\n/g; s/ *[Pp]assword//g' > "$PWCONF"
|
||||||
cat "$BASEDIR/etc/tunnelkeeper.conf" | grep -Ei '^( *debug|Host)' | awk '{print $1 " " $2}' | grep -i -B1 --no-group-separator debug | tr '\n' ' ' | sed 's/Host /\n/g; s/ *[Dd]ebug//g' > "$DEBUGCONF"
|
cat "$BASEDIR/etc/tunnelkeeper.conf" | grep -Ei '^( *debug|Host)' | awk '{print $1 " " $2}' | grep -i -B1 --no-group-separator debug | tr '\n' ' ' | sed 's/Host /\n/g; s/ *[Dd]ebug//g' > "$DEBUGCONF"
|
||||||
@ -88,7 +98,7 @@ case "$1" in
|
|||||||
[[ -e "$BASEDIR/var/tunnelkeeper.pid" ]] && exit
|
[[ -e "$BASEDIR/var/tunnelkeeper.pid" ]] && exit
|
||||||
genconfig
|
genconfig
|
||||||
echo $$ > "$BASEDIR/var/tunnelkeeper.pid"
|
echo $$ > "$BASEDIR/var/tunnelkeeper.pid"
|
||||||
cat "$SSHCONF" | awk '/^Host / {print $2}' | grep -v \* | xargs -I% -P0 $0 FORKSTART % '#tunnelkeeper' &
|
cat "$BASEDIR/etc/tunnelkeeper.conf" | awk '/^Host / {print $2}' | xargs -I% -P0 $0 FORKSTART % '#tunnelkeeper' &
|
||||||
;;
|
;;
|
||||||
stop )
|
stop )
|
||||||
rm -f "$BASEDIR/var/tunnelkeeper.pid"
|
rm -f "$BASEDIR/var/tunnelkeeper.pid"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user