5 Commits

Author SHA1 Message Date
e50cac1a39 Merge 6243908ecc2d11864b183101429f36121f4fe378 into aaa2e26b6e468112665ad7b15d144574a969b411 2024-06-24 11:42:41 -04:00
aaa2e26b6e Fix file name 2024-06-23 20:37:10 +02:00
052198c61b Add support for Hybrid > 8.2.44 (#283)
The module system changed, modules now need to be loaded explicitly
2024-06-21 21:38:16 +02:00
9f33633cc7 Fix the help filename as of the latest commit. (#282) 2024-06-17 19:15:02 +02:00
465f6637ed enable backtraces in sable (#280) 2024-06-15 08:25:14 +02:00
4 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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";

View File

@ -101,7 +101,7 @@ TEMPLATE_V4_CONFIG = """
# HELP/HELPOP
<module name="help">
<include file="examples/help.conf.example">
<include file="examples/help.example.conf">
"""

View File

@ -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)