Created
September 17, 2017 07:31
-
-
Save adrianharabula/91a24103f27c91e60f51016f8c3c192b to your computer and use it in GitHub Desktop.
autossh startup script for openrc init on alpine linux
This file contains hidden or 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 | |
#/etc/init.d/autossh | |
name="busybox $SVCNAME" | |
command="/usr/bin/autossh" | |
command_args="-M 0 -f -T -N connection" | |
command_user="root" | |
pidfile="/run/$SVCNAME/$SVCNAME.pid" | |
command_background="yes" | |
depend() { | |
need net localmount | |
after firewall | |
} |
Many thanks for the update! That was long time ago, thanks for reminding me.
…On Fri, 16 Oct 2020, 19:07 def324, ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
I had to add the following at the beginning to make it stop correctly:
AUTOSSH_PIDFILE="/run/$SVCNAME/$SVCNAME.pid"
export AUTOSSH_PIDFILE
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/91a24103f27c91e60f51016f8c3c192b#gistcomment-3492026>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARKOPWOHUZYRCPJ7WRSQBDSLBVUDANCNFSM4STQ2MHQ>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to add the following at the beginning to make it stop correctly: