Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of echo port in monitor port parameter #10

Open
uniwan-benoni opened this issue Sep 14, 2016 · 0 comments
Open

Support of echo port in monitor port parameter #10

uniwan-benoni opened this issue Sep 14, 2016 · 0 comments

Comments

@uniwan-benoni
Copy link

Hi,

I want to use the monitor port with an echo port but it's not supported by your module yet.

Here is a fix to add this feature:

--- /etc/autossh/autossh-tunnel.sh      2016-09-07 16:42:45.532809108 +0200
+++ /tmp/puppet-file20160914-31221-1kakevn      2016-09-14 10:57:58.345376435 +0200
@@ -61,7 +61,8 @@
        rm -f $PID_FILE
   fi
   runuser - $USER -c "$SVC_BIN $SVC_CONF"
-  cmd=`echo "$SVC_BIN $SVC_CONF" | sed 's/-f/ /g' | sed 's/\s/\\\s+/g'`
+  tunnelargs=$(echo ${TUNNEL_ARGS} | sed 's/:/ /g')
+  cmd=`echo "$SVC_BIN $tunnelargs ${BIND}:${PORT}:${FORWARD_HOST}:${HOSTPORT} -p ${REMOTE_SSH_PORT} ${REMOTE_SSH_USER}@${REMOTE_SSH_HOST}" | sed 's/-f/ /g' | sed 's/\s/\\\s+/g'`
   pgrep -f "$cmd" > $PID_FILE

   # wait for it to load up

Hope you will integrate it in your module.

Best regards,
Bénoni Delfosse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant