2007-11-01 17:15:42 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2007 OpenWrt.org
|
|
|
|
START=80
|
|
|
|
|
|
|
|
start_service () {
|
|
|
|
local section="$1"
|
|
|
|
config_get ssh "$section" ssh
|
|
|
|
config_get monitorport "$section" monitorport
|
|
|
|
config_get poll "$section" poll
|
|
|
|
|
|
|
|
AUTOSSH_POLL=${poll:-"600"} autossh -M ${monitorport:-"20000"} -f ${ssh}
|
|
|
|
}
|
|
|
|
|
2009-07-25 22:06:36 +00:00
|
|
|
boot() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2007-11-01 17:15:42 +00:00
|
|
|
start() {
|
|
|
|
config_load "autossh"
|
|
|
|
config_foreach start_service autossh
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
killall autossh
|
|
|
|
}
|