diff options
author | Rosen Penev <rosenp@gmail.com> | 2019-03-31 20:29:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-31 20:29:31 -0700 |
commit | 40e289c596c2b7bc674840e3e045904cb84d94e1 (patch) | |
tree | df535db6c6ad607ea2c4ec68661898cedf5f23b4 /net | |
parent | 83644742ca9d7bc0ef3a637ba4beefd293afba33 (diff) | |
parent | 2f35c4735c02f89779fa12ead00f3ee47731f404 (diff) |
Merge pull request #8103 from jefferyto/e2guardian-init
e2guardian: Update init script
Diffstat (limited to 'net')
-rw-r--r-- | net/e2guardian/Makefile | 2 | ||||
-rw-r--r-- | net/e2guardian/files/e2guardian.init | 26 |
2 files changed, 10 insertions, 18 deletions
diff --git a/net/e2guardian/Makefile b/net/e2guardian/Makefile index 2628711ea..5fd458ae3 100644 --- a/net/e2guardian/Makefile +++ b/net/e2guardian/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2guardian PKG_VERSION:=3.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org> diff --git a/net/e2guardian/files/e2guardian.init b/net/e2guardian/files/e2guardian.init index 4a5981e86..b4c236e40 100644 --- a/net/e2guardian/files/e2guardian.init +++ b/net/e2guardian/files/e2guardian.init @@ -11,7 +11,7 @@ LOGFILE="/tmp/e2guardian/access.log" GROUPCONFIG="/tmp/e2guardian/e2guardianf1.conf" validate_e2guardian_section() { - uci_validate_section e2guardian e2guardian "${1}" \ + uci_load_validate e2guardian e2guardian "$1" "$2" \ 'accessdeniedaddress:string' \ 'bannediplist:string' \ 'contentscanexceptions:string' \ @@ -83,22 +83,9 @@ validate_e2guardian_section() { 'weightedphrasemode:range(0,2)' } -start_service() { - - local accessdeniedaddress bannediplist contentscanexceptions contentscanner contentscannertimeout \ - createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \ - downloadmanager exceptioniplist filecachedir loglocation \ - filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \ - initialtrickledelay ipcfilename ipipcfilename language languagedir logadblocks logchildprocesshandling \ - logclienthostnames logconnectionhandlingerrors logexceptionhits logfileformat loglevel loguseragent \ - maxagechildren maxchildren maxcontentfilecachescansize maxcontentfiltersize maxcontentramcachescansize \ - maxips maxsparechildren maxuploadsize minchildren minsparechildren nodaemon nologger \ - pcontimeout perroomdirectory phrasefiltermode prefercachedlists preforkchildren preservecase proxyexchange \ - proxyip proxyport proxytimeout recheckreplacedurls reverseaddresslookups reverseclientiplookups scancleancache \ - showweightedfound softrestart trickledelay urlcacheage urlcachenumber urlipcfilename usecustombannedflash \ - usecustombannedimage usexforwardedfor weightedphrasemode - - validate_e2guardian_section e2guardian || { +start_e2guardian_instance() { + + [ "$2" = 0 ] || { echo "validation failed" return 1 } @@ -198,6 +185,11 @@ start_service() { } +start_service() +{ + validate_e2guardian_section e2guardian start_e2guardian_instance +} + stop_service() { PID=`cat /tmp/e2guardian/e2guardian.pid` |