On Tue, Apr 25, 2023 at 10:45:21AM -0500, [email protected] wrote:
> [..]
> [ some bad paste ]
Just a clarification: the rc script in /etc/rc.d/autossh actually looks like
#!/bin/ksh
# start autossh tunnel
# requires remoteuser user with $HOME/.ssh/config and keys
daemon="/usr/local/bin/autossh"
daemon_flags_1="-M 0 -f -N tun-remoteA"
daemon_flags_2="-M 0 -f -N tun-remoteB"
daemon_user="remoteuser"
. /etc/rc.d/rc.subr
rc_reload=NO
pexp="autossh:.*"
# Child will not return a config parsing error to the parent.
rc_start() {
# use rcexec here since daemon_flags may contain arguments with spaces
${rcexec} "${daemon} ${daemon_flags_1}" && \
${rcexec} "${daemon} ${daemon_flags_2}"
}
rc_cmd $1
[..]