mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-12 19:50:57 +05:00
Fix nginx docs validation pid path
This commit is contained in:
parent
8fa9120d18
commit
b7d638efb6
@ -240,7 +240,11 @@ def validate_non_running(snippet: Snippet, disposition: str) -> None:
|
||||
assert nginx.is_file() and os.access(nginx, os.X_OK)
|
||||
with tempfile.TemporaryDirectory(prefix="archivebox-docs-nginx-") as temp:
|
||||
config = Path(temp) / "nginx.conf"
|
||||
config.write_text(f"events {{}}\nhttp {{\nserver {{\nlisten 8080;\n{snippet.code}\n}}\n}}\n")
|
||||
config.write_text(
|
||||
f"pid {temp}/nginx.pid;\n"
|
||||
f"events {{}}\n"
|
||||
f"http {{\nserver {{\nlisten 8080;\n{snippet.code}\n}}\n}}\n",
|
||||
)
|
||||
result = subprocess.run(
|
||||
[nginx, "-t", "-c", config, "-p", temp],
|
||||
text=True,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user