From d4e334682d2eb2427efc0c46fafd6f7bfeaf9aa7 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Mon, 2 Sep 2024 16:43:02 +0200 Subject: [PATCH] fix:Update restore-module script to prevent blocking restore due to static port still in use --- imageroot/actions/restore-module/60systemd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imageroot/actions/restore-module/60systemd b/imageroot/actions/restore-module/60systemd index 588b8ec..c9e3d39 100755 --- a/imageroot/actions/restore-module/60systemd +++ b/imageroot/actions/restore-module/60systemd @@ -30,8 +30,9 @@ import agent subprocess.run(["systemctl", "--user", "enable","--now", "nginx.service"]) subprocess.run(["systemctl", "--user", "restart", "nginx.service"]) -agent.run_helper("systemctl", "--user", "enable","--now", "sftpgo.service").check_returncode() -agent.run_helper("systemctl", "--user", "restart", "sftpgo.service").check_returncode() +# do not stop/block the restore because the static port could be seen still in use by the previous module +agent.run_helper("systemctl", "--user", "enable","--now", "sftpgo.service") +agent.run_helper("systemctl", "--user", "restart", "sftpgo.service") # detect if a service has configurations, hence start it PhpServiceArray = glob.glob('php*-fpm-custom.d') @@ -41,4 +42,3 @@ for folder in PhpServiceArray: if ListConfigurations : subprocess.run(["download-php-fpm",ConfiguredServices[0].replace('php','')]) subprocess.run(["systemctl", "--user", "enable","--now", "phpfpm@"+ConfiguredServices[0].replace('php','')+".service"]) -