Created
August 7, 2014 17:59
-
-
Save simonmorley/481c6bc07fa7aadcf8c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
if [ "X$SSH_AUTH_SOCK" = "X" ]; then | |
eval `ssh-agent -s` | |
ssh-add $HOME/.ssh/id_rsa | |
fi | |
HOST= | |
REDIS_SLAVE_PORT=6000 | |
AUTOSSH_POLL=600 | |
AUTOSSH_PORT=0 | |
AUTOSSH_GATETIME=30 | |
AUTOSSH_LOGFILE=/tmp/auto.log | |
AUTOSSH_DEBUG=yes | |
AUTOSSH_PATH=/usr/local/bin/ssh | |
export AUTOSSH_POLL AUTOSSH_LOGFILE AUTOSSH_DEBUG AUTOSSH_PATH AUTOSSH_GATETIME AUTOSSH_PORT | |
autossh -2 -fN -M ${AUTOSSH_PORT} -C -L ${REDIS_SLAVE_PORT}:localhost:6379 HOST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment