Compare commits
No commits in common. "6a80582fbe4bc7702afa66ac9b10879fe590c244" and "c9829683101fff5c71e8075f8a213669a75a247d" have entirely different histories.
6a80582fbe
...
c982968310
3 changed files with 0 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,4 +1,3 @@
|
||||||
__pycache__/
|
__pycache__/
|
||||||
venv/
|
venv/
|
||||||
.env
|
.env
|
||||||
debug.log
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ class Config:
|
||||||
data = dotenv_values()
|
data = dotenv_values()
|
||||||
MINECRAFTD_PASSWORD: str | None = data.get("MINECRAFTD_PASSWORD")
|
MINECRAFTD_PASSWORD: str | None = data.get("MINECRAFTD_PASSWORD")
|
||||||
START_COMMAND_FILE: str = data.get("START_COMMAND_FILE") or "start.sh"
|
START_COMMAND_FILE: str = data.get("START_COMMAND_FILE") or "start.sh"
|
||||||
SERVER_PATH: str = data.get("SERVER_PATH") or "."
|
|
||||||
SERVER_HOST: str = data.get("SERVER_HOST") or "localhost"
|
SERVER_HOST: str = data.get("SERVER_HOST") or "localhost"
|
||||||
SERVER_PORT: int = int(data.get("SERVER_PORT") or 25565)
|
SERVER_PORT: int = int(data.get("SERVER_PORT") or 25565)
|
||||||
SERVER_RCON_PORT: int = int(data.get("SERVER_RCON_PORT") or 25575)
|
SERVER_RCON_PORT: int = int(data.get("SERVER_RCON_PORT") or 25575)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ class ProcessController:
|
||||||
self.start_command: list[str] = shlex.split(
|
self.start_command: list[str] = shlex.split(
|
||||||
Path(Config.START_COMMAND_FILE).read_text()
|
Path(Config.START_COMMAND_FILE).read_text()
|
||||||
)
|
)
|
||||||
self.cwd = Config.SERVER_PATH
|
|
||||||
self.process: Popen | None = None
|
self.process: Popen | None = None
|
||||||
self.last_status: Literal[ProcessStatus.STOPPED, ProcessStatus.CRASHED] = (
|
self.last_status: Literal[ProcessStatus.STOPPED, ProcessStatus.CRASHED] = (
|
||||||
ProcessStatus.STOPPED
|
ProcessStatus.STOPPED
|
||||||
|
|
@ -44,7 +43,6 @@ class ProcessController:
|
||||||
stderr=None,
|
stderr=None,
|
||||||
stdin=None,
|
stdin=None,
|
||||||
start_new_session=True,
|
start_new_session=True,
|
||||||
cwd=self.cwd,
|
|
||||||
)
|
)
|
||||||
logger.info(
|
logger.info(
|
||||||
"ProcessController.start() - Started process with PID: %s",
|
"ProcessController.start() - Started process with PID: %s",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue