fix(service): исправить fs.stat в lifecycle.uc, очистку кэша LuCI и перезапуск rpcd/uhttpd

This commit is contained in:
Dushnilin
2026-09-01 15:15:42 +03:00
parent a1563708c1
commit 2d551bd2d1
3 changed files with 10 additions and 6 deletions
+5 -3
View File
@@ -1427,7 +1427,7 @@ function installer_finalize_legacy() {
}
function installer_post_install() {
remove_globs(env("TACHYON_INSTALLER_LUCI_CACHE_GLOBS", "/var/luci-indexcache* /tmp/luci-indexcache*"));
remove_globs(env("TACHYON_INSTALLER_LUCI_CACHE_GLOBS", "/var/luci-indexcache* /tmp/luci-indexcache* /var/luci-modulecache* /tmp/luci-modulecache*"));
for (let path in [
env("TACHYON_INSTALLER_LATEST_VERSION_CACHE", "/tmp/tachyon.latest-version.cache"),
env("TACHYON_INSTALLER_SYSTEM_INFO_CACHE", "/var/run/tachyon/system-info.json"),
@@ -1437,8 +1437,10 @@ function installer_post_install() {
])
remove_path(path);
if (path_executable(INSTALLER_RPCD_INIT))
run_args([ "timeout", "10", INSTALLER_RPCD_INIT, "reload" ]);
if (path_executable(INSTALLER_RPCD_INIT)) {
run_args([ "timeout", "10", INSTALLER_RPCD_INIT, "restart" ]);
run_args([ "timeout", "10", "/etc/init.d/uhttpd", "restart" ]);
}
if (env("TACHYON_WAS_ENABLED", "0") == "1" && path_executable(INSTALLER_TACHYON_INIT))
run_args([ "timeout", "10", INSTALLER_TACHYON_INIT, "enable" ]);
+1 -1
View File
@@ -779,7 +779,7 @@ function start_main() {
module_success(BYEDPI_UC, [ "start-runtime" ]);
for (let comp_svc in [ "forkop", "podkop" ]) {
if (file_exists("/etc/init.d/" + comp_svc)) {
if (fs.stat("/etc/init.d/" + comp_svc) != null) {
command_status_from_args([ "/etc/init.d/" + comp_svc, "stop" ]);
}
}
+4 -2
View File
@@ -255,7 +255,7 @@ function luci_cache_globs() {
if (configured != "")
return split(configured, /[ \t\r\n]+/);
return [ "/var/luci-indexcache*", "/tmp/luci-indexcache*" ];
return [ "/var/luci-indexcache*", "/tmp/luci-indexcache*", "/var/luci-modulecache*", "/tmp/luci-modulecache*" ];
}
function remove_luci_index_cache() {
@@ -297,7 +297,9 @@ function luci_postinst() {
remove_component_update_cache();
if (!PACKAGE_TEST_MODE) {
if (path_exists("/etc/init.d/rpcd"))
command_success_from_args([ "/etc/init.d/rpcd", "reload" ]);
command_success_from_args([ "/etc/init.d/rpcd", "restart" ]);
if (path_exists("/etc/init.d/uhttpd"))
command_success_from_args([ "/etc/init.d/uhttpd", "restart" ]);
command_success_from_args([ "logger", "-t", "tachyon", "[info] Package defaults applied" ]);
}
return true;