autossh: fix procd env issue

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 <leo@hyper.ag>
This commit is contained in:
Leo Soares 2021-10-06 14:03:42 +01:00 committed by Rosen Penev
parent 38143e6f8b
commit 9c4d79519c
1 changed files with 1 additions and 2 deletions

View 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
}