mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
adblock: update 3.4.3
* add pidfile writing / check to prevent further race conditions * ease the download utility selection: uclient-fetch (default), wget, curl, aria2c, wget-nossl, busybox-wget are pre-configured * add debug download logging in case of an error, e.g. wrong url * change 'malware' blocklist source url * add logfile information to email template * LuCI: add 'Download Utility' select box * LuCI: add new "running" status Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
@@ -12,6 +12,7 @@ EXTRA_HELP=" suspend Suspend adblock processing
|
||||
|
||||
adb_init="/etc/init.d/adblock"
|
||||
adb_script="/usr/bin/adblock.sh"
|
||||
adb_pidfile="/var/run/adblock.pid"
|
||||
|
||||
boot()
|
||||
{
|
||||
@@ -33,6 +34,7 @@ start_service()
|
||||
fi
|
||||
procd_open_instance "adblock"
|
||||
procd_set_param command "${adb_script}" "${@}"
|
||||
procd_set_param pidfile "${adb_pidfile}"
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
@@ -57,16 +59,19 @@ restart()
|
||||
|
||||
suspend()
|
||||
{
|
||||
[ -s "${adb_pidfile}" ] && return 1
|
||||
rc_procd "${adb_script}" suspend
|
||||
}
|
||||
|
||||
resume()
|
||||
{
|
||||
[ -s "${adb_pidfile}" ] && return 1
|
||||
rc_procd "${adb_script}" resume
|
||||
}
|
||||
|
||||
query()
|
||||
{
|
||||
[ -s "${adb_pidfile}" ] && return 1
|
||||
rc_procd "${adb_script}" query "${1}"
|
||||
}
|
||||
|
||||
@@ -86,6 +91,8 @@ status()
|
||||
json_get_var value "${key}"
|
||||
printf " + %-15s : %s\n" "${key}" "${value}"
|
||||
done
|
||||
else
|
||||
printf "%s\n" "::: no adblock runtime information available"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user