autossh: fix procd env issue
authorLeo Soares <redacted>
Wed, 6 Oct 2021 13:03:42 +0000 (14:03 +0100)
committerRosen Penev <redacted>
Wed, 6 Oct 2021 19:30:45 +0000 (12:30 -0700)
This commit fixes an issue where the `AUTOSSH_GATETIME` is not available in the `procd`  environment which gets overwritten by the second `procd_set_param env` call.
It now calls the `procd_set_param env` once with the two variables, instead of twice.

Signed-off-by: Leo Soares <redacted>
net/autossh/files/autossh.init

index f73e415734277ac7832ac7055473f3a8017b3684..9f6225bb081fd998bb2ca7ad8ea28935f5567d05 100644 (file)
@@ -18,8 +18,7 @@ start_instance() {
        procd_open_instance
        procd_set_param command /usr/sbin/autossh -M ${monitorport:-20000} ${ssh}
        procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
-       procd_set_param env AUTOSSH_GATETIME="${gatetime:-30}"
-       procd_set_param env AUTOSSH_POLL="${poll:-600}"
+       procd_set_param env AUTOSSH_GATETIME="${gatetime:-30}" AUTOSSH_POLL="${poll:-600}"
        procd_close_instance
 }
 
git clone https://git.99rst.org/PROJECT