aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-04-11 20:34:20 +0200
committerGitHub <noreply@github.com>2018-04-11 20:34:20 +0200
commitc750f17fff1ab5ee3d72d82cb0e17ac7a7a2e388 (patch)
tree20b062f95beb979921a0065286091ee0511752b3
parent3bee7544d9a6fde235b7ab2b2c149239a1988f2f (diff)
parentaf31a192f80cf948004334507073751294a436a2 (diff)
Merge pull request #5896 from allaudet/improve-autossh-config
autossh: add an 'enabled' option within the uci configuration file
-rw-r--r--net/autossh/Makefile2
-rw-r--r--net/autossh/files/autossh.config1
-rw-r--r--net/autossh/files/autossh.hotplug2
-rw-r--r--net/autossh/files/autossh.init3
4 files changed, 6 insertions, 2 deletions
diff --git a/net/autossh/Makefile b/net/autossh/Makefile
index c28ce14ce..fa4543af7 100644
--- a/net/autossh/Makefile
+++ b/net/autossh/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=autossh
PKG_VERSION:=1.4e
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://www.harding.motd.ca/autossh/
diff --git a/net/autossh/files/autossh.config b/net/autossh/files/autossh.config
index 6ec323858..faee881a9 100644
--- a/net/autossh/files/autossh.config
+++ b/net/autossh/files/autossh.config
@@ -3,3 +3,4 @@ config autossh
option gatetime '0'
option monitorport '20000'
option poll '600'
+ option enabled '0'
diff --git a/net/autossh/files/autossh.hotplug b/net/autossh/files/autossh.hotplug
index 4f695f44c..0e73cae4c 100644
--- a/net/autossh/files/autossh.hotplug
+++ b/net/autossh/files/autossh.hotplug
@@ -10,5 +10,5 @@
[ "$ACTION" = "ifdown" ] && {
/etc/init.d/autossh stop
}
-
+
}
diff --git a/net/autossh/files/autossh.init b/net/autossh/files/autossh.init
index f81bf4d87..e21b3910b 100644
--- a/net/autossh/files/autossh.init
+++ b/net/autossh/files/autossh.init
@@ -10,6 +10,9 @@ start_instance() {
config_get gatetime "$section" 'gatetime'
config_get monitorport "$section" 'monitorport'
config_get poll "$section" 'poll'
+ config_get_bool enabled "$section" 'enabled' '1'
+
+ [ "$enabled" = 1 ] || exit 0
export AUTOSSH_GATETIME="${gatetime:-30}"
export AUTOSSH_POLL="${poll:-600}"