Created
May 23, 2017 17:01
-
-
Save Klowner/636bb441a491f71f674f183d5755fc62 to your computer and use it in GitHub Desktop.
autossh connection with openrc
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
#!/sbin/openrc-run | |
name=$RC_SVCNAME | |
command="/usr/bin/autossh" | |
pidfile="/run/${RC_SVCNAME}.pid" | |
AUTOSSH_LOGFILE="${AUTOSSH_LOGFILE:-/var/log/${RC_SVCNAME}.log}" | |
start_stop_daemon_args="-e AUTOSSH_PIDFILE=\"${pidfile}\" -e AUTOSSH_LOGFILE=\"${AUTOSSH_LOGFILE}\"" | |
command_args="-M 10984 -N -f -o 'PubkeyAuthentication=yes' -o 'PasswordAuthentication=no' \ | |
-i /root/.ssh/id_rsa -R 6666:localhost:22 middleman@middleman" | |
depend() { | |
need networking | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment