diff --git a/luci-app-passwall/root/usr/share/passwall/rule_update.lua b/luci-app-passwall/root/usr/share/passwall/rule_update.lua
index 70373b592..d1528cc44 100755
--- a/luci-app-passwall/root/usr/share/passwall/rule_update.lua
+++ b/luci-app-passwall/root/usr/share/passwall/rule_update.lua
@@ -367,14 +367,14 @@ local function non_file_check(file_path, header_content)
end
local function GeoToRule(rule_name, rule_type, out_path)
- if not api.is_finded("geoview") then
- log(rule_name .. "生成失败,缺少 geoview 组件。")
- return false;
+ local bin = api.finded_com("geoview")
+ if not (bin and api.compare_versions(api.get_app_version("geoview"), ">=", "0.1.10")) then
+ log("[警告] Geoview 组件缺失或版本过低,规则生成流程已被跳过。")
+ return false
end
local geosite_path = asset_location .. "geosite.dat"
local geoip_path = asset_location .. "geoip.dat"
local file_path = (rule_type == "domain") and geosite_path or geoip_path
- local bin = api.get_app_path("geoview")
local geo_arg
if rule_type == "domain" then
if rule_name == "gfwlist" then
@@ -389,7 +389,13 @@ local function GeoToRule(rule_name, rule_type, out_path)
end
local cmd = string.format(bin .. " -input '%s' %s -lowmem=true -output '%s'", file_path, geo_arg, out_path)
sys.exec(cmd)
- return true;
+ local local_file_size = tonumber(fs.stat(out_path, "size") or 0)
+ if local_file_size == 0 then
+ os.remove(out_path)
+ log(rule_name .. " 生成失败,请确保 Geo 文件正确且包含目标规则。")
+ return false
+ end
+ return true
end
--fetch rule
@@ -407,10 +413,10 @@ local function fetch_rule(rule_name, rule_type, url, exclude_domain, max_retries
end
for k, v in ipairs(url) do
- local current_file = "/tmp/" .. rule_name .. "_dl" .. k
- local success = false
+ local current_file = "/tmp/" .. rule_name .. "_dl" .. k
+ local success = false
- if v ~= "geo2rule" then
+ if v ~= "geo2rule" then
for i = 1, max_attempts do
local http_code, header = curl(v, current_file)
if http_code == 200 and not non_file_check(current_file, header) then
diff --git a/luci-app-taskplan/Makefile b/luci-app-taskplan/Makefile
index 9d1c7cf8b..23fffe5ea 100644
--- a/luci-app-taskplan/Makefile
+++ b/luci-app-taskplan/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-taskplan
PKG_VERSION:=3.0.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
diff --git a/luci-app-taskplan/htdocs/luci-static/resources/view/taskplan/scheduled.js b/luci-app-taskplan/htdocs/luci-static/resources/view/taskplan/scheduled.js
index fe36ab103..89e378fdd 100644
--- a/luci-app-taskplan/htdocs/luci-static/resources/view/taskplan/scheduled.js
+++ b/luci-app-taskplan/htdocs/luci-static/resources/view/taskplan/scheduled.js
@@ -18,7 +18,7 @@ return view.extend({
},
render: function(data) {
- var m = new form.Map('taskplan', _('Scheduled task'),
+ var m = new form.Map('taskplan', _('Scheduled Tasks'),
_('The original [Timing Settings] includes scheduled task execution and startup task execution. Presets include over 10 functions, including restart, shutdown, network restart, memory release, system cleaning, network sharing, network shutdown, automatic detection of network disconnects and reconnection, MWAN3 load balancing detection of reconnection, and custom scripts') +
_('N1-N5 is continuous, N1, N3, N5 is discontinuous, */N represents every N hours or every N minutes.The week can only be 0~6, the hour can only be 0~23, the minute can only be 0~59, the unavailable time is 48 hours.'));
diff --git a/luci-app-taskplan/htdocs/luci-static/resources/view/taskplan/startup.js b/luci-app-taskplan/htdocs/luci-static/resources/view/taskplan/startup.js
index b85b309fe..b9f0abbdf 100644
--- a/luci-app-taskplan/htdocs/luci-static/resources/view/taskplan/startup.js
+++ b/luci-app-taskplan/htdocs/luci-static/resources/view/taskplan/startup.js
@@ -18,7 +18,7 @@ return view.extend({
},
render: function(data) {
- var m = new form.Map('taskplan', _('Startup task'),
+ var m = new form.Map('taskplan', _('Startup Tasks'),
_('The original [Timing Settings] includes scheduled task execution and startup task execution. Presets include over 10 functions, including restart, shutdown, network restart, memory release, system cleaning, network sharing, network shutdown, automatic detection of network disconnects and reconnection, MWAN3 load balancing detection of reconnection, and custom scripts') +
_('The task to be executed upon startup, with a startup delay time unit of seconds.'));
diff --git a/luci-app-taskplan/po/zh_Hans/taskplan.po b/luci-app-taskplan/po/zh_Hans/taskplan.po
index db6eb3e90..2a9f4613c 100644
--- a/luci-app-taskplan/po/zh_Hans/taskplan.po
+++ b/luci-app-taskplan/po/zh_Hans/taskplan.po
@@ -16,12 +16,10 @@ msgstr "管控"
msgid "Task Plan"
msgstr "任务设置"
-# scheduled.js - 页面标题和说明
-
msgid "Scheduled Tasks"
msgstr "定时执行任务"
-msgid "Startup tasks"
+msgid "Startup Tasks"
msgstr "开机启动任务"
msgid "The original [Timing Settings] includes scheduled task execution and startup task execution. Presets include over 10 functions, including restart, shutdown, network restart, memory release, system cleaning, network sharing, network shutdown, automatic detection of network disconnects and reconnection, MWAN3 load balancing detection of reconnection, and custom scripts"
@@ -30,7 +28,6 @@ msgstr "原【定时设置】包括定时任务执行和启动任务执行。
msgid "N1-N5 is continuous, N1, N3, N5 is discontinuous, */N represents every N hours or every N minutes.The week can only be 0~6, the hour can only be 0~23, the minute can only be 0~59, the unavailable time is 48 hours."
msgstr "N1-N5为连续,N1、N3、N5为不连续,*/N表示每N小时或每N分钟。星期只能0~6,小时只能0~23,分钟只能0~59,不可用时间为48小时。"
-# scheduled.js - 全局脚本
msgid "Edit Custom Script"
msgstr "编辑自定义脚本"
diff --git a/luci-app-taskplan/root/etc/init.d/taskplan b/luci-app-taskplan/root/etc/init.d/taskplan
index e591e1ea2..261926795 100755
--- a/luci-app-taskplan/root/etc/init.d/taskplan
+++ b/luci-app-taskplan/root/etc/init.d/taskplan
@@ -95,8 +95,7 @@ run_taskplan()
esac
fi
done
-
- echo 'wait' >> $TT
+
echo 'exit 0' >> $TT
}