In a tool like this one, you really want an option to establish if the service should start or not by default on boot time, especially when its configuration file has to be customized by the user. In the configuration file, the new 'enabled' option is setted to '0' by default since the configuration provided by default will not be the one finally used. In the init script, the new 'enabled' option is setted to '1' by default in order to support the previous configuration file behaviour. Signed-off-by: Adrià Llaudet <adria.llaudet@gmail.com>
14 lines
203 B
Bash
14 lines
203 B
Bash
#!/bin/sh
|
|
# Copyright (C) 2007 OpenWrt.org
|
|
|
|
/etc/init.d/autossh enabled && {
|
|
|
|
[ "$ACTION" = "ifup" ] && {
|
|
/etc/init.d/autossh start
|
|
}
|
|
|
|
[ "$ACTION" = "ifdown" ] && {
|
|
/etc/init.d/autossh stop
|
|
}
|
|
|
|
}
|