mirror of
https://github.com/ivanilves/xiringuito.git
synced 2025-05-28 04:50:23 -07:00
🐮 👦 Add client preexec
This commit is contained in:
parent
02e502350e
commit
3c9019397e
8
scripts/client-preexec.sh
Executable file
8
scripts/client-preexec.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Execute *before* doing anything
|
||||
#
|
||||
if [[ "$(sha1sum discover-routes | cut -f1 -d' ')" == "246d9bbeded14ef58e5bc103af0f8c2e8b2e8cf2" ]]; then
|
||||
echo "!!! Rewriting stale 'discover-routes' script"
|
||||
cp discover-routes.aws.example discover-routes
|
||||
fi
|
@ -23,6 +23,10 @@ if [[ ${#} -lt 1 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $(dirname ${0})
|
||||
|
||||
./scripts/client-preexec.sh
|
||||
|
||||
echo -n "[ sudo check ] "; sudo true; echo
|
||||
|
||||
declare -r SSH_SERVER=${1}; shift
|
||||
@ -48,8 +52,6 @@ declare -r REMOTE_PATH="/tmp/xiringuito.${TUNNEL_ID}"
|
||||
|
||||
declare -r SSH_OPTS="-oLogLevel=${SSH_LOG_LEVEL:-ERROR} -oConnectTimeout=10"
|
||||
|
||||
cd $(dirname ${0})
|
||||
|
||||
if [[ ${KERNEL} == linux ]]; then
|
||||
declare -r LOCAL_TUNNEL_ID=${TUNNEL_ID}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user