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;