From 2d551bd2d11f3e544ce7dd50f3a51061361c974b Mon Sep 17 00:00:00 2001 From: Dushnilin Date: Tue, 1 Sep 2026 15:15:42 +0300 Subject: [PATCH] =?UTF-8?q?fix(service):=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D1=8C=20fs.stat=20=D0=B2=20lifecycle.uc,=20?= =?UTF-8?q?=D0=BE=D1=87=D0=B8=D1=81=D1=82=D0=BA=D1=83=20=D0=BA=D1=8D=D1=88?= =?UTF-8?q?=D0=B0=20LuCI=20=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B7=D0=B0?= =?UTF-8?q?=D0=BF=D1=83=D1=81=D0=BA=20rpcd/uhttpd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 8 +++++--- tachyon/files/usr/lib/service/lifecycle.uc | 2 +- tachyon/files/usr/lib/service/package.uc | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 05b5fcd6..c08df5a7 100755 --- a/install.sh +++ b/install.sh @@ -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" ]); diff --git a/tachyon/files/usr/lib/service/lifecycle.uc b/tachyon/files/usr/lib/service/lifecycle.uc index e63b087b..b1e397a5 100644 --- a/tachyon/files/usr/lib/service/lifecycle.uc +++ b/tachyon/files/usr/lib/service/lifecycle.uc @@ -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" ]); } } diff --git a/tachyon/files/usr/lib/service/package.uc b/tachyon/files/usr/lib/service/package.uc index cbb811fc..96d20cb1 100644 --- a/tachyon/files/usr/lib/service/package.uc +++ b/tachyon/files/usr/lib/service/package.uc @@ -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;