packages/net/autossh/files/autossh.init
florian ff1d7d7b71 [package] add autossh hotplug script, remove duplicate restart init script function (#4860)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16985 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-07-25 22:06:36 +00:00

26 lines
418 B
Bash

#!/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}
}
boot() {
return
}
start() {
config_load "autossh"
config_foreach start_service autossh
}
stop() {
killall autossh
}