1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2007-2011 OpenWrt.org
9 config_get
ssh "$section" 'ssh'
10 config_get gatetime
"$section" 'gatetime'
11 config_get monitorport
"$section" 'monitorport'
12 config_get poll
"$section" 'poll'
13 config_get_bool enabled
"$section" 'enabled' '1'
15 [ "$enabled" = 1 ] ||
exit 0
17 export AUTOSSH_GATETIME
="${gatetime:-30}"
18 export AUTOSSH_POLL
="${poll:-600}"
19 service_start
/usr
/sbin
/autossh
-M ${monitorport:-20000} -f ${ssh}
28 config_foreach start_instance
'autossh'
32 service_stop
/usr
/sbin
/autossh