diff options
author | Stan Grishin <stangri@melmac.ca> | 2024-08-03 23:32:11 +0000 |
---|---|---|
committer | Stan Grishin <stangri@melmac.ca> | 2024-08-03 23:32:11 +0000 |
commit | bd7bee7731a45ee72960562546cc713a03fbfc92 (patch) | |
tree | 1eed82d11fd32b346537364498bec1bef1d318fd /applications/luci-app-adblock-fast/root | |
parent | ee1bf573ec94eb23f99c4c5edcd86e53e0300719 (diff) |
luci-app-adblock-fast: sync with 1.1.2-3 principal package
Signed-off-by: Stan Grishin <stangri@melmac.ca>
Diffstat (limited to 'applications/luci-app-adblock-fast/root')
-rwxr-xr-x | applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast b/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast index 2f84904c01..222b03619e 100755 --- a/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast +++ b/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast @@ -14,7 +14,7 @@ # ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "pause" }' # ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "stop" }' -readonly luciCompat='1' +readonly luciCompat='2' readonly adbFunctionsFile='/etc/init.d/adblock-fast' if [ -s "$adbFunctionsFile" ]; then # shellcheck source=../../../../../adblock-fast/files/etc/init.d/adblock-fast @@ -29,7 +29,10 @@ get_file_url_filesizes() { local url size config_get url "$1" 'url' config_get size "$1" 'size' - [ -n "$size" ] || size="$(get_url_filesize "$url")" + if [ -z "$size" ]; then + size="$(get_url_filesize "$url")" + uci_set "$name" "$1" 'size' "$size" + fi json_add_object json_add_string 'url' "$url" json_add_int 'size' "$size" @@ -45,6 +48,7 @@ get_file_url_filesizes() { json_close_object json_dump json_cleanup + [ -n "$(uci_changes "$name")" ] && uci_commit "$name" } get_init_list() { |