From e00758f93f095babe21a2863e29707079512a8d1 Mon Sep 17 00:00:00 2001 From: jogo Date: Thu, 13 Dec 2012 14:11:48 +0000 Subject: [PATCH] AA: packages: znc: don't start with default config Backport r34658. Signed-off-by: Jonas Gorski git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_12.09@34660 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/znc/Makefile | 2 +- net/znc/files/znc.conf | 5 ++++- net/znc/files/znc.init | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/net/znc/Makefile b/net/znc/Makefile index 8a2bfa0..6b3f787 100644 --- a/net/znc/Makefile +++ b/net/znc/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=znc PKG_VERSION:=0.206 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://znc.in/releases \ diff --git a/net/znc/files/znc.conf b/net/znc/files/znc.conf index b281f44..1b0d842 100644 --- a/net/znc/files/znc.conf +++ b/net/znc/files/znc.conf @@ -7,6 +7,9 @@ config znc # load global modules (You need to install them first): # list module 'fail2ban' + # remove this to enable the service + option disabled 1 + config user 'sampleUser' # Use either a plain text password or use the full sha256#... line. # You can generate one with 'znc -s'. @@ -20,7 +23,7 @@ config user 'sampleUser' # list channel '#chan optional_password' # list of allowed servers: - list server 'chat.freenode.net 6667' + # list server 'chat.freenode.net 6667' # load user modules (' [params...]'): # list module 'simple_away -timer 10 disconnected' diff --git a/net/znc/files/znc.init b/net/znc/files/znc.init index 01af217..bc3a00e 100644 --- a/net/znc/files/znc.init +++ b/net/znc/files/znc.init @@ -8,6 +8,7 @@ PID_FILE=${ZNC_CONFIG_PATH}/znc.pid ZNC_CONFIG=${ZNC_CONFIG_PATH}/configs/znc.conf EXTERNAL_CONFIG=0 +DISABLED= RUNAS_USER= RUNAS_GROUP= @@ -33,6 +34,10 @@ znc_global() { local znc_config_path local znc_pem_file + config_get_bool DISABLED "$znc" disabled 0 + + [ "$DISABLED" -eq 0 ] || return 0 + config_get znc_config_path "$znc" znc_config_path config_get RUNAS_USER "$znc" runas_user @@ -122,6 +127,10 @@ start() { config_load znc config_foreach znc_global znc + if [ "$DISABLED" -eq 1 ]; then + return 0 + fi + if [ "$EXTERNAL_CONFIG" -eq 0 ] then config_foreach add_listener listener -- 2.11.0