luci-app-adblock-fast: sync with adblock-fast 1.0.1-1
* improve error/warning/status messaging * trim rpcd script code from functions shared with principal package * depends on https://github.com/openwrt/packages/pull/22619 Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
parent
ac7b37ef01
commit
ced38d8fc1
4 changed files with 111 additions and 175 deletions
|
@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
|
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
|
||||||
PKG_VERSION:=1.0.0-7
|
PKG_VERSION:=1.0.1-1
|
||||||
|
|
||||||
LUCI_TITLE:=AdBlock-Fast Web UI
|
LUCI_TITLE:=AdBlock-Fast Web UI
|
||||||
LUCI_DESCRIPTION:=Provides Web UI for adblock-fast service.
|
LUCI_DESCRIPTION:=Provides Web UI for adblock-fast service.
|
||||||
|
|
|
@ -112,9 +112,7 @@ var status = baseclass.extend({
|
||||||
statusRestarting: _("Restarting"),
|
statusRestarting: _("Restarting"),
|
||||||
statusForceReloading: _("Force Reloading"),
|
statusForceReloading: _("Force Reloading"),
|
||||||
statusDownloading: _("Downloading lists"),
|
statusDownloading: _("Downloading lists"),
|
||||||
statusError: _("Error"),
|
statusFail: _("Failed to start"),
|
||||||
statusWarning: _("Warning"),
|
|
||||||
statusFail: _("Fail"),
|
|
||||||
statusSuccess: _("Active"),
|
statusSuccess: _("Active"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -191,6 +189,10 @@ var status = baseclass.extend({
|
||||||
warningMissingRecommendedPackages: _(
|
warningMissingRecommendedPackages: _(
|
||||||
"Some recommended packages are missing"
|
"Some recommended packages are missing"
|
||||||
),
|
),
|
||||||
|
warningInvalidCompressedCacheDir: _(
|
||||||
|
"Invalid compressed cache directory '%s'"
|
||||||
|
),
|
||||||
|
warningFreeRamCheckFail: _("Can't detect free RAM"),
|
||||||
};
|
};
|
||||||
var warningsTitle = E(
|
var warningsTitle = E(
|
||||||
"label",
|
"label",
|
||||||
|
@ -279,6 +281,9 @@ var status = baseclass.extend({
|
||||||
errorNothingToDo: _(
|
errorNothingToDo: _(
|
||||||
"No blocked list URLs nor blocked-domains enabled"
|
"No blocked list URLs nor blocked-domains enabled"
|
||||||
),
|
),
|
||||||
|
errorTooLittleRam: _(
|
||||||
|
"Free ram (%s) is not enough to process all enabled block-lists"
|
||||||
|
),
|
||||||
};
|
};
|
||||||
var errorsTitle = E(
|
var errorsTitle = E(
|
||||||
"label",
|
"label",
|
||||||
|
@ -461,9 +466,9 @@ var status = baseclass.extend({
|
||||||
);
|
);
|
||||||
var buttonsText = E("div", {}, [
|
var buttonsText = E("div", {}, [
|
||||||
btn_start,
|
btn_start,
|
||||||
// btn_gap,
|
|
||||||
// btn_action_pause,
|
|
||||||
btn_gap,
|
btn_gap,
|
||||||
|
// btn_action_pause,
|
||||||
|
// btn_gap,
|
||||||
btn_action_dl,
|
btn_action_dl,
|
||||||
btn_gap,
|
btn_gap,
|
||||||
btn_stop,
|
btn_stop,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:223
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:225
|
||||||
msgid "%s is currently disabled"
|
msgid "%s is currently disabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ msgstr ""
|
||||||
msgid "Action"
|
msgid "Action"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:118
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:116
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:61
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:61
|
||||||
msgid "Active"
|
msgid "Active"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -55,7 +55,7 @@ msgstr ""
|
||||||
msgid "AdBlock-Fast - Configuration"
|
msgid "AdBlock-Fast - Configuration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:121
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:119
|
||||||
msgid "AdBlock-Fast - Status"
|
msgid "AdBlock-Fast - Status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ msgstr ""
|
||||||
msgid "Blocked Domains"
|
msgid "Blocked Domains"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:134
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:132
|
||||||
msgid "Blocking %s domains (with %s)."
|
msgid "Blocking %s domains (with %s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -115,23 +115,27 @@ msgstr ""
|
||||||
msgid "Cache file"
|
msgid "Cache file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:160
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:158
|
||||||
msgid "Cache file found."
|
msgid "Cache file found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:195
|
||||||
|
msgid "Can't detect free RAM"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:68
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:68
|
||||||
msgid "Compressed cache"
|
msgid "Compressed cache"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:139
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:137
|
||||||
msgid "Compressed cache file created."
|
msgid "Compressed cache file created."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:162
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:160
|
||||||
msgid "Compressed cache file found."
|
msgid "Compressed cache file found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:221
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:223
|
||||||
msgid "Config (%s) validation failure!"
|
msgid "Config (%s) validation failure!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -165,7 +169,7 @@ msgid ""
|
||||||
"Directory for compressed cache file of block-list in the persistent memory."
|
"Directory for compressed cache file of block-list in the persistent memory."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:419
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:424
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:239
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:239
|
||||||
msgid "Disable"
|
msgid "Disable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -174,11 +178,11 @@ msgstr ""
|
||||||
msgid "Disable Debugging"
|
msgid "Disable Debugging"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:156
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:154
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:413
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:418
|
||||||
msgid "Disabling %s service"
|
msgid "Disabling %s service"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -207,7 +211,7 @@ msgstr ""
|
||||||
msgid "Downloading lists"
|
msgid "Downloading lists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:400
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:405
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:240
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:240
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:394
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:394
|
||||||
msgid "Enable"
|
msgid "Enable"
|
||||||
|
@ -222,109 +226,111 @@ msgstr ""
|
||||||
msgid "Enables debug output to /tmp/adblock-fast.log."
|
msgid "Enables debug output to /tmp/adblock-fast.log."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:394
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:399
|
||||||
msgid "Enabling %s service"
|
msgid "Enabling %s service"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:115
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:58
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:58
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:293
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:298
|
||||||
msgid "Errors encountered, please check the %sREADME%s"
|
msgid "Errors encountered, please check the %sREADME%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:117
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:60
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:60
|
||||||
msgid "Fail"
|
msgid "Fail"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:246
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:248
|
||||||
msgid "Failed to access shared memory"
|
msgid "Failed to access shared memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:242
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:244
|
||||||
msgid "Failed to create '%s' file"
|
msgid "Failed to create '%s' file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:264
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:266
|
||||||
msgid "Failed to create block-list or restart DNS resolver"
|
msgid "Failed to create block-list or restart DNS resolver"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:255
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:257
|
||||||
msgid "Failed to create compressed cache"
|
msgid "Failed to create compressed cache"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:241
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:243
|
||||||
msgid "Failed to create directory for %s file"
|
msgid "Failed to create directory for %s file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:276
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:278
|
||||||
msgid "Failed to create output/cache/gzip file directory"
|
msgid "Failed to create output/cache/gzip file directory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:278
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:280
|
||||||
msgid "Failed to detect format %s"
|
msgid "Failed to detect format %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:271
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:273
|
||||||
msgid "Failed to download %s"
|
msgid "Failed to download %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:269
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:271
|
||||||
msgid "Failed to download Config Update file"
|
msgid "Failed to download Config Update file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:250
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:252
|
||||||
msgid "Failed to format data file"
|
msgid "Failed to format data file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:259
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:261
|
||||||
msgid "Failed to move '%s' to '%s'"
|
msgid "Failed to move '%s' to '%s'"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:252
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:254
|
||||||
msgid "Failed to move temporary data file to '%s'"
|
msgid "Failed to move temporary data file to '%s'"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:248
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:250
|
||||||
msgid "Failed to optimize data file"
|
msgid "Failed to optimize data file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:273
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:275
|
||||||
msgid "Failed to parse %s"
|
msgid "Failed to parse %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:272
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:274
|
||||||
msgid "Failed to parse Config Update file"
|
msgid "Failed to parse Config Update file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:249
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:251
|
||||||
msgid "Failed to process allow-list"
|
msgid "Failed to process allow-list"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:267
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:269
|
||||||
msgid "Failed to reload/restart DNS resolver"
|
msgid "Failed to reload/restart DNS resolver"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:257
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:259
|
||||||
msgid "Failed to remove temporary files"
|
msgid "Failed to remove temporary files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:245
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:247
|
||||||
msgid "Failed to restart/reload DNS resolver"
|
msgid "Failed to restart/reload DNS resolver"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:247
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:249
|
||||||
msgid "Failed to sort data file"
|
msgid "Failed to sort data file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:266
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:115
|
||||||
|
msgid "Failed to start"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:268
|
||||||
msgid "Failed to stop %s"
|
msgid "Failed to stop %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:258
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:260
|
||||||
msgid "Failed to unpack compressed cache"
|
msgid "Failed to unpack compressed cache"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -332,7 +338,7 @@ msgstr ""
|
||||||
msgid "Force DNS Ports"
|
msgid "Force DNS Ports"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:142
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:140
|
||||||
msgid "Force DNS ports:"
|
msgid "Force DNS ports:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -349,7 +355,7 @@ msgstr ""
|
||||||
msgid "Force Router DNS server to all local devices"
|
msgid "Force Router DNS server to all local devices"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:341
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:346
|
||||||
msgid "Force redownloading %s block lists"
|
msgid "Force redownloading %s block lists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -357,6 +363,10 @@ msgstr ""
|
||||||
msgid "Forces Router DNS use on local devices, also known as DNS Hijacking."
|
msgid "Forces Router DNS use on local devices, also known as DNS Hijacking."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:285
|
||||||
|
msgid "Free ram (%s) is not enough to process all enabled block-lists"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/root/usr/share/rpcd/acl.d/luci-app-adblock-fast.json:3
|
#: applications/luci-app-adblock-fast/root/usr/share/rpcd/acl.d/luci-app-adblock-fast.json:3
|
||||||
msgid "Grant UCI and file access for luci-app-adblock-fast"
|
msgid "Grant UCI and file access for luci-app-adblock-fast"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -385,6 +395,10 @@ msgstr ""
|
||||||
msgid "Individual domains to be blocked."
|
msgid "Individual domains to be blocked."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:193
|
||||||
|
msgid "Invalid compressed cache directory '%s'"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:221
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:221
|
||||||
msgid "LED to indicate status"
|
msgid "LED to indicate status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -403,15 +417,15 @@ msgstr ""
|
||||||
msgid "No AdBlock on dnsmasq"
|
msgid "No AdBlock on dnsmasq"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:274
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:276
|
||||||
msgid "No HTTPS/SSL support on device"
|
msgid "No HTTPS/SSL support on device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:280
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:282
|
||||||
msgid "No blocked list URLs nor blocked-domains enabled"
|
msgid "No blocked list URLs nor blocked-domains enabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:176
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:174
|
||||||
msgid "Not installed or not found"
|
msgid "Not installed or not found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -419,11 +433,11 @@ msgstr ""
|
||||||
msgid "Output Verbosity Setting"
|
msgid "Output Verbosity Setting"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:362
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:367
|
||||||
msgid "Pause"
|
msgid "Pause"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:357
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:362
|
||||||
msgid "Pausing %s"
|
msgid "Pausing %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -450,7 +464,7 @@ msgstr ""
|
||||||
msgid "Processing lists"
|
msgid "Processing lists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:347
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:352
|
||||||
msgid "Redownload"
|
msgid "Redownload"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -459,19 +473,19 @@ msgstr ""
|
||||||
msgid "Restarting"
|
msgid "Restarting"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:460
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:465
|
||||||
msgid "Service Control"
|
msgid "Service Control"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:286
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:291
|
||||||
msgid "Service Errors"
|
msgid "Service Errors"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:125
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:123
|
||||||
msgid "Service Status"
|
msgid "Service Status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:198
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:200
|
||||||
msgid "Service Warnings"
|
msgid "Service Warnings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -491,11 +505,11 @@ msgstr ""
|
||||||
msgid "Some output"
|
msgid "Some output"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:192
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:190
|
||||||
msgid "Some recommended packages are missing"
|
msgid "Some recommended packages are missing"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:328
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:333
|
||||||
msgid "Start"
|
msgid "Start"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -504,7 +518,7 @@ msgstr ""
|
||||||
msgid "Starting"
|
msgid "Starting"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:322
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:327
|
||||||
msgid "Starting %s service"
|
msgid "Starting %s service"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -512,7 +526,7 @@ msgstr ""
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:381
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:386
|
||||||
msgid "Stop"
|
msgid "Stop"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -525,7 +539,7 @@ msgstr ""
|
||||||
msgid "Stopped"
|
msgid "Stopped"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:375
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:380
|
||||||
msgid "Stopping %s service"
|
msgid "Stopping %s service"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -541,29 +555,29 @@ msgstr ""
|
||||||
msgid "Suppress output"
|
msgid "Suppress output"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:239
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:241
|
||||||
msgid "The %s failed to discover WAN gateway"
|
msgid "The %s failed to discover WAN gateway"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:227
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:229
|
||||||
msgid ""
|
msgid ""
|
||||||
"The dnsmasq ipset support is enabled, but dnsmasq is either not installed or "
|
"The dnsmasq ipset support is enabled, but dnsmasq is either not installed or "
|
||||||
"installed dnsmasq does not support ipset"
|
"installed dnsmasq does not support ipset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:230
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:232
|
||||||
msgid ""
|
msgid ""
|
||||||
"The dnsmasq ipset support is enabled, but ipset is either not installed or "
|
"The dnsmasq ipset support is enabled, but ipset is either not installed or "
|
||||||
"installed ipset does not support '%s' type"
|
"installed ipset does not support '%s' type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:233
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:235
|
||||||
msgid ""
|
msgid ""
|
||||||
"The dnsmasq nft set support is enabled, but dnsmasq is either not installed "
|
"The dnsmasq nft set support is enabled, but dnsmasq is either not installed "
|
||||||
"or installed dnsmasq does not support nft set"
|
"or installed dnsmasq does not support nft set"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:236
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:238
|
||||||
msgid "The dnsmasq nft sets support is enabled, but nft is not installed"
|
msgid "The dnsmasq nft sets support is enabled, but nft is not installed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -589,7 +603,7 @@ msgstr ""
|
||||||
msgid "Use AdBlocking on the dnsmasq instance(s)"
|
msgid "Use AdBlocking on the dnsmasq instance(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:189
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:187
|
||||||
msgid ""
|
msgid ""
|
||||||
"Use of external dnsmasq config file detected, please set '%s' option to '%s'"
|
"Use of external dnsmasq config file detected, please set '%s' option to '%s'"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -606,11 +620,10 @@ msgstr ""
|
||||||
msgid "Version"
|
msgid "Version"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:128
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:126
|
||||||
msgid "Version %s"
|
msgid "Version %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:116
|
|
||||||
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:59
|
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:59
|
||||||
msgid "Warning"
|
msgid "Warning"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright 2023 MOSSDeF, Stan Grishin (stangri@melmac.ca)
|
# Copyright 2023 MOSSDeF, Stan Grishin (stangri@melmac.ca)
|
||||||
# shellcheck disable=SC1091,SC2018,SC2019,SC2039,SC3043,SC3057,SC3060
|
# shellcheck disable=SC2018,SC2019,SC3043,SC3060
|
||||||
|
|
||||||
# TechRef: https://openwrt.org/docs/techref/rpcd
|
# TechRef: https://openwrt.org/docs/techref/rpcd
|
||||||
# TESTS
|
# TESTS
|
||||||
|
@ -14,86 +14,26 @@
|
||||||
# ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "pause" }'
|
# ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "pause" }'
|
||||||
# ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "stop" }'
|
# ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "stop" }'
|
||||||
|
|
||||||
. /lib/functions.sh
|
readonly adbFunctionsFile='/etc/init.d/adblock-fast'
|
||||||
. /lib/functions/network.sh
|
if [ -s "$adbFunctionsFile" ]; then
|
||||||
. /usr/share/libubox/jshn.sh
|
# shellcheck source=../../../../../adblock-fast/files/etc/init.d/adblock-fast
|
||||||
|
. "$adbFunctionsFile"
|
||||||
readonly packageName="adblock-fast"
|
else
|
||||||
readonly dnsmasqAddnhostsFile="/var/run/${packageName}/dnsmasq.addnhosts"
|
logger -t adblock-fast 'error' "adblock-fast init.d file ($adbFunctionsFile) not found!"
|
||||||
readonly dnsmasqAddnhostsCache="/var/run/${packageName}/dnsmasq.addnhosts.cache"
|
print_json_string 'error' "adblock-fast init.d file ($adbFunctionsFile) not found!"
|
||||||
readonly dnsmasqAddnhostsGzip="${packageName}.dnsmasq.addnhosts.gz"
|
fi
|
||||||
readonly dnsmasqConfFile="/tmp/dnsmasq.d/${packageName}"
|
|
||||||
readonly dnsmasqConfCache="/var/run/${packageName}/dnsmasq.conf.cache"
|
|
||||||
readonly dnsmasqConfGzip="${packageName}.dnsmasq.conf.gz"
|
|
||||||
readonly dnsmasqIpsetFile="/tmp/dnsmasq.d/${packageName}.ipset"
|
|
||||||
readonly dnsmasqIpsetCache="/var/run/${packageName}/dnsmasq.ipset.cache"
|
|
||||||
readonly dnsmasqIpsetGzip="${packageName}.dnsmasq.ipset.gz"
|
|
||||||
readonly dnsmasqNftsetFile="/tmp/dnsmasq.d/${packageName}.nftset"
|
|
||||||
readonly dnsmasqNftsetCache="/var/run/${packageName}/dnsmasq.nftset.cache"
|
|
||||||
readonly dnsmasqNftsetGzip="${packageName}.dnsmasq.nftset.gz"
|
|
||||||
readonly dnsmasqServersFile="/var/run/${packageName}/dnsmasq.servers"
|
|
||||||
readonly dnsmasqServersCache="/var/run/${packageName}/dnsmasq.servers.cache"
|
|
||||||
readonly dnsmasqServersGzip="${packageName}.dnsmasq.servers.gz"
|
|
||||||
readonly unboundFile="/var/lib/unbound/adb_list.${packageName}"
|
|
||||||
readonly unboundCache="/var/run/${packageName}/unbound.cache"
|
|
||||||
readonly unboundGzip="${packageName}.unbound.gz"
|
|
||||||
readonly jsonFile="/dev/shm/$packageName-status.json"
|
|
||||||
|
|
||||||
str_contains() { [ -n "$1" ] &&[ -n "$2" ] && [ "${1//$2}" != "$1" ]; }
|
|
||||||
str_contains_word() { echo "$1" | grep -q -w "$2"; }
|
|
||||||
str_to_lower() { echo "$1" | tr 'A-Z' 'a-z'; }
|
|
||||||
str_to_upper() { echo "$1" | tr 'a-z' 'A-Z'; }
|
|
||||||
is_enabled() { uci -q get "${1}.config.enabled"; }
|
|
||||||
get_version() { grep -m1 -A2 -w "^Package: $1$" /usr/lib/opkg/status | sed -n 's/Version: //p'; }
|
|
||||||
print_json_bool() { json_init; json_add_boolean "$1" "$2"; json_dump; json_cleanup; }
|
|
||||||
print_json_int() { json_init; json_add_int "$1" "$2"; json_dump; json_cleanup; }
|
|
||||||
print_json_string() { json_init; json_add_string "$1" "$2"; json_dump; json_cleanup; }
|
|
||||||
logger() { /usr/bin/logger -t "$packageName" "$@"; }
|
|
||||||
ubus_get_status() { ubus call service list "{ 'name': '$packageName' }" | jsonfilter -e "@['${packageName}'].instances.main.data.${1}"; }
|
|
||||||
ubus_get_ports() { ubus call service list "{ 'name': '$packageName' }" | jsonfilter -e "@['${packageName}'].instances.main.data.firewall.*.dest_port"; }
|
|
||||||
is_present() { command -v "$1" >/dev/null 2>&1; }
|
|
||||||
sanitize_dir() { [ -d "$(readlink -fn "$1")" ] && readlink -fn "$1"; }
|
|
||||||
json() {
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
local action="$1" param="$2" value="$3" i
|
|
||||||
if [ -s "$jsonFile" ]; then
|
|
||||||
json_load_file "$jsonFile" 2>/dev/null
|
|
||||||
json_select 'data' 2>/dev/null
|
|
||||||
for i in status message error stats reload restart; do
|
|
||||||
json_get_var $i "$i" 2>/dev/null
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
case "$action" in
|
|
||||||
get)
|
|
||||||
case "$param" in
|
|
||||||
*)
|
|
||||||
printf "%b" "$(eval echo "\$$param")"; return;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
get_url_filesize() {
|
|
||||||
local url="$1" size size_command
|
|
||||||
[ -n "$url" ] || { print_json_int 'size' '0'; return 0; }
|
|
||||||
is_present 'curl' || { print_json_int 'size' '0'; return 0; }
|
|
||||||
size_command='curl --silent --insecure --fail --head --request GET'
|
|
||||||
size="$($size_command "$url" | grep -i 'content-length:' | awk '{print $2}'; )"
|
|
||||||
echo "$size"
|
|
||||||
}
|
|
||||||
|
|
||||||
_get_file_url_size() {
|
|
||||||
local url size
|
|
||||||
config_get url "$1" 'url'
|
|
||||||
config_get size "$1" 'size'
|
|
||||||
[ -n "$size" ] || size="$(get_url_filesize "$url")"
|
|
||||||
json_add_object
|
|
||||||
json_add_string 'url' "$url"
|
|
||||||
json_add_int 'size' "$size"
|
|
||||||
json_close_object
|
|
||||||
}
|
|
||||||
|
|
||||||
get_file_url_filesizes() {
|
get_file_url_filesizes() {
|
||||||
|
_get_file_url_size() {
|
||||||
|
local url size
|
||||||
|
config_get url "$1" 'url'
|
||||||
|
config_get size "$1" 'size'
|
||||||
|
[ -n "$size" ] || size="$(get_url_filesize "$url")"
|
||||||
|
json_add_object
|
||||||
|
json_add_string 'url' "$url"
|
||||||
|
json_add_int 'size' "$size"
|
||||||
|
json_close_object
|
||||||
|
}
|
||||||
local name="$1" i
|
local name="$1" i
|
||||||
json_init
|
json_init
|
||||||
json_add_object "$name"
|
json_add_object "$name"
|
||||||
|
@ -201,19 +141,14 @@ get_init_status() {
|
||||||
json_init
|
json_init
|
||||||
json_add_object "$name"
|
json_add_object "$name"
|
||||||
json_add_boolean 'enabled' "$(is_enabled "$name")"
|
json_add_boolean 'enabled' "$(is_enabled "$name")"
|
||||||
i="$(json 'get' 'status')"
|
json_add_string 'status' "$(json 'get' 'status')"
|
||||||
j="$(ubus_get_status 'status')"
|
if is_running "$name"; then
|
||||||
if [ "$i" = 'statusSuccess' ] && [ "$i" != "$j" ]; then
|
|
||||||
i='statusStopped'
|
|
||||||
fi
|
|
||||||
json_add_string 'status' "$i"
|
|
||||||
if [ "$i" = 'statusSuccess' ]; then
|
|
||||||
json_add_boolean 'running' '1'
|
json_add_boolean 'running' '1'
|
||||||
else
|
else
|
||||||
json_add_boolean 'running' '0'
|
json_add_boolean 'running' '0'
|
||||||
fi
|
fi
|
||||||
json_add_string 'version' "$(get_version "$name")"
|
json_add_string 'version' "$(get_version "$name")"
|
||||||
errors="$(ubus_get_status errors)"
|
errors="$(ubus_get_data errors)"
|
||||||
json_add_array 'errors'
|
json_add_array 'errors'
|
||||||
if [ -n "$errors" ]; then
|
if [ -n "$errors" ]; then
|
||||||
for i in $errors; do
|
for i in $errors; do
|
||||||
|
@ -231,7 +166,7 @@ get_init_status() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
json_close_array
|
json_close_array
|
||||||
warnings="$(ubus_get_status warnings)"
|
warnings="$(ubus_get_data warnings)"
|
||||||
json_add_array 'warnings'
|
json_add_array 'warnings'
|
||||||
if [ -n "$warnings" ]; then
|
if [ -n "$warnings" ]; then
|
||||||
for i in $warnings; do
|
for i in $warnings; do
|
||||||
|
@ -259,7 +194,7 @@ get_init_status() {
|
||||||
else
|
else
|
||||||
json_add_boolean 'force_dns_active' '0'
|
json_add_boolean 'force_dns_active' '0'
|
||||||
fi
|
fi
|
||||||
json_add_int 'entries' "$(ubus_get_status entries)"
|
json_add_int 'entries' "$(ubus_get_data entries)"
|
||||||
json_add_string 'dns' "$dns"
|
json_add_string 'dns' "$dns"
|
||||||
json_add_string 'outputFile' "$outputFile"
|
json_add_string 'outputFile' "$outputFile"
|
||||||
json_add_string 'outputCache' "$outputCache"
|
json_add_string 'outputCache' "$outputCache"
|
||||||
|
@ -287,23 +222,6 @@ get_init_status() {
|
||||||
json_cleanup
|
json_cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
check_ipset() { { command -v ipset && /usr/sbin/ipset help hash:net; } >/dev/null 2>&1; }
|
|
||||||
check_nft() { command -v nft >/dev/null 2>&1; }
|
|
||||||
check_dnsmasq() { command -v dnsmasq >/dev/null 2>&1; }
|
|
||||||
check_unbound() { command -v unbound >/dev/null 2>&1; }
|
|
||||||
check_dnsmasq_ipset() {
|
|
||||||
local o;
|
|
||||||
check_dnsmasq || return 1
|
|
||||||
o="$(dnsmasq -v 2>/dev/null)"
|
|
||||||
check_ipset && ! echo "$o" | grep -q 'no-ipset' && echo "$o" | grep -q 'ipset'
|
|
||||||
}
|
|
||||||
check_dnsmasq_nftset() {
|
|
||||||
local o;
|
|
||||||
check_dnsmasq || return 1
|
|
||||||
o="$(dnsmasq -v 2>/dev/null)"
|
|
||||||
check_nft && ! echo "$o" | grep -q 'no-nftset' && echo "$o" | grep -q 'nftset'
|
|
||||||
}
|
|
||||||
|
|
||||||
get_platform_support() {
|
get_platform_support() {
|
||||||
local name
|
local name
|
||||||
name="$(basename "$1")"
|
name="$(basename "$1")"
|
||||||
|
|
Loading…
Reference in a new issue