X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsecurity%2Fscreened_tunneler.sh;h=82352cc7a699077a2d39139b276f1de28e9d9336;hb=9e076ff4d414f8c92424c5c091c9b70592e7c8ed;hp=8e855bffddcb2725f061b19a39c785f3f6bdbfb4;hpb=16523355f3a68b80a95200555665d2f6c007e102;p=feisty_meow.git diff --git a/scripts/security/screened_tunneler.sh b/scripts/security/screened_tunneler.sh old mode 100755 new mode 100644 index 8e855bff..82352cc7 --- a/scripts/security/screened_tunneler.sh +++ b/scripts/security/screened_tunneler.sh @@ -68,7 +68,7 @@ fi #hmmm: these variables should be configurable from plug-ins someday. -TUNNEL_ALERT_SOUND=$FEISTY_MEOW_DIR/database/sounds/woouoo.wav +TUNNEL_ALERT_SOUND=$FEISTY_MEOW_APEX/infobase/sounds/woouoo.wav if [ ! -z "$1" ]; then TUNNEL_ALERT_SOUND=$1 fi @@ -111,6 +111,13 @@ if [ $LAUNCHING_TUNNEL -eq 1 ]; then # loop does not exit on its own. else # this version re-launches the script but tells it to start the tunnel. + existingScreens="$(screen -ls | grep "$TUNNEL_SCREEN_NAME")" + if [ ! -z "$existingScreens" ]; then + echo "This script is already running a screen for: $TUNNEL_SCREEN_NAME" + echo "Connect to that and zap it first before we try to start a new one," + echo "e.g.: screen -r -S \"$TUNNEL_SCREEN_NAME\"" + exit 1 + fi screen -L -S "$TUNNEL_SCREEN_NAME" -d -m bash $0 "$TUNNEL_USER_PLUS_HOST" "$TUNNEL_LINK" "$TUNNEL_SCREEN_NAME" "$TUNNEL_SECURITY_KEY" go fi