Skip to content

Commit

Permalink
fix:Update restore-module script to prevent blocking restore due to s…
Browse files Browse the repository at this point in the history
…tatic port still in use
  • Loading branch information
stephdl committed Sep 2, 2024
1 parent a0f37de commit d4e3346
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imageroot/actions/restore-module/60systemd
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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"])

0 comments on commit d4e3346

Please sign in to comment.