This repository was archived by the owner on Jun 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ die () {
2020[ -z " ${1} " ] && die " Need at least 1 port number argument!"
2121MYAPP_PORTS=$@
2222
23- [ -z " ${SSH_HOME} " ] && die " Need environment variable \$ SSH_HOME set!"
2423[ -z " ${CONTAINER_IP} " ] && die " Need environment variable \$ CONTAINER_IP set!"
2524[ -z " ${SSHD_PORT} " ] && die " Need environment variable \$ SSHD_PORT set!"
25+ [ -z " ${KNOWN_HOSTS_PATH} " ] && die " Need env var \$ KNOWN_HOSTS_PATH set!"
2626BASE_SSH_CMD=" -p ${SSHD_PORT} -o StrictHostKeyChecking=no -N -fn application@${CONTAINER_IP} "
2727
2828# # convert space separated string into a bash array
@@ -33,6 +33,6 @@ declare -a MYAPP_PORTS=${MYAPP_PORTS}
3333# then set them up in the background
3434for i in " ${MYAPP_PORTS[@]} " ; do
3535 kill $( lsof -i tcp:${i} -F p | cut -b 2-) > /dev/null 2>&1 || true
36- ssh-keygen -f " ${SSH_HOME} /.ssh/known_hosts " -R [${CONTAINER_IP} ]:${SSHD_PORT} > /dev/null 2>&1 || true
36+ ssh-keygen -f " ${KNOWN_HOSTS_PATH} " -R [${CONTAINER_IP} ]:${SSHD_PORT} > /dev/null 2>&1 || true
3737 ssh ${BASE_SSH_CMD} -R localhost:${i} :localhost:${i} &
3838done
You can’t perform that action at this time.
0 commit comments