mirror of
https://github.com/progval/irctest.git
synced 2025-04-05 06:49:47 +00:00
Compare commits
5 Commits
dacb4eb517
...
e50cac1a39
Author | SHA1 | Date | |
---|---|---|---|
e50cac1a39 | |||
aaa2e26b6e | |||
052198c61b | |||
9f33633cc7 | |||
465f6637ed |
@ -1,3 +1,4 @@
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
from typing import Optional
|
||||
@ -51,6 +52,8 @@ class BaseHybridController(BaseServerController, DirectoryBasedController):
|
||||
)
|
||||
else:
|
||||
ssl_config = ""
|
||||
binary_path = shutil.which(self.binary_name)
|
||||
assert binary_path, f"Could not find '{binary_path}' executable"
|
||||
with self.open_file("server.conf") as fd:
|
||||
fd.write(
|
||||
(self.template_config).format(
|
||||
@ -60,6 +63,7 @@ class BaseHybridController(BaseServerController, DirectoryBasedController):
|
||||
services_port=services_port,
|
||||
password_field=password_field,
|
||||
ssl_config=ssl_config,
|
||||
install_prefix=Path(binary_path).parent.parent,
|
||||
)
|
||||
)
|
||||
assert self.directory
|
||||
|
@ -3,6 +3,9 @@ from typing import Set, Type
|
||||
from .base_hybrid import BaseHybridController
|
||||
|
||||
TEMPLATE_CONFIG = """
|
||||
module_base_path = "{install_prefix}/lib/ircd-hybrid/modules";
|
||||
.include "./reference.modules.conf"
|
||||
|
||||
serverinfo {{
|
||||
name = "My.Little.Server";
|
||||
sid = "42X";
|
||||
|
@ -101,7 +101,7 @@ TEMPLATE_V4_CONFIG = """
|
||||
|
||||
# HELP/HELPOP
|
||||
<module name="help">
|
||||
<include file="examples/help.conf.example">
|
||||
<include file="examples/help.example.conf">
|
||||
"""
|
||||
|
||||
|
||||
|
@ -408,6 +408,7 @@ class SableController(BaseServerController, DirectoryBasedController):
|
||||
],
|
||||
cwd=self.directory,
|
||||
preexec_fn=os.setsid,
|
||||
env={"RUST_BACKTRACE": "1", **os.environ},
|
||||
)
|
||||
self.pgroup_id = os.getpgid(self.proc.pid)
|
||||
|
||||
@ -485,6 +486,7 @@ class SableServicesController(BaseServicesController):
|
||||
],
|
||||
cwd=self.server_controller.directory,
|
||||
preexec_fn=os.setsid,
|
||||
env={"RUST_BACKTRACE": "1", **os.environ},
|
||||
)
|
||||
self.pgroup_id = os.getpgid(self.proc.pid)
|
||||
|
||||
|
Reference in New Issue
Block a user