Allow time for the Rspamd submission listener to start
This commit is contained in:
1 parent
974d31779b
commit
9900f92bb0
1 file changed
+3
-2
@@ -31,7 +31,8 @@ def prepare_milter_directory(signer_uid):
|
|||||||
|
|
||||||
def wait_for_milter():
|
def wait_for_milter():
|
||||||
path = MILTER_DIRECTORY / "submit.sock"
|
path = MILTER_DIRECTORY / "submit.sock"
|
||||||
for _ in range(90):
|
deadline = time.monotonic() + 180
|
||||||
|
while time.monotonic() < deadline:
|
||||||
try:
|
try:
|
||||||
if stat.S_ISSOCK(path.lstat().st_mode):
|
if stat.S_ISSOCK(path.lstat().st_mode):
|
||||||
return
|
return
|
||||||
@@ -115,7 +116,7 @@ def configure():
|
|||||||
"configtest",
|
"configtest",
|
||||||
label="Validate the signing and rate-limit configuration",
|
label="Validate the signing and rate-limit configuration",
|
||||||
)
|
)
|
||||||
engine.systemctl("enable", "--now", "rspamd.service")
|
engine.systemctl("enable", "rspamd.service")
|
||||||
engine.systemctl("restart", "rspamd.service")
|
engine.systemctl("restart", "rspamd.service")
|
||||||
wait_for_milter()
|
wait_for_milter()
|
||||||
engine.run(
|
engine.run(
|
||||||
|
|||||||
Reference in new issue
Block a user