mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
adblock: update 3.8.9
* more startup tweaks * re-use f_log function in helper scripts * small fixes / polish up for forthcoming 19.07 release Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
@@ -15,14 +15,15 @@ adb_init="/etc/init.d/adblock"
|
||||
adb_script="/usr/bin/adblock.sh"
|
||||
adb_pidfile="/var/run/adblock.pid"
|
||||
|
||||
if [ -s "${adb_pidfile}" ] && [ "${action}" != "help" ] && [ "${action}" != "status" ]
|
||||
if [ -s "${adb_pidfile}" ] && \
|
||||
[ "${action}" != "help" ] && [ "${action}" != "status" ] && [ "${action}" != "boot" ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
boot()
|
||||
{
|
||||
adb_boot=1
|
||||
[ -s "${adb_pidfile}" ] && > "${adb_pidfile}"
|
||||
rc_procd start_service
|
||||
}
|
||||
|
||||
@@ -30,19 +31,17 @@ start_service()
|
||||
{
|
||||
if [ "$("${adb_init}" enabled; printf "%u" ${?})" -eq 0 ]
|
||||
then
|
||||
if [ -n "${adb_boot}" ]
|
||||
if [ "${action}" = "boot" ]
|
||||
then
|
||||
local trigger="$(uci_get adblock global adb_trigger)"
|
||||
if [ "${trigger}" != "timed" ]
|
||||
if [ "$(uci_get adblock global adb_trigger)" != "timed" ]
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
local nice="$(uci_get adblock extra adb_nice "0")"
|
||||
procd_open_instance "adblock"
|
||||
procd_set_param command "${adb_script}" "${@}"
|
||||
procd_set_param pidfile "${adb_pidfile}"
|
||||
procd_set_param nice "${nice}"
|
||||
procd_set_param nice "$(uci_get adblock extra adb_nice "0")"
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
|
||||
Reference in New Issue
Block a user