mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-29 18:53:35 +05:00
refactor: implement constants for klipper
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -13,15 +13,21 @@ from core.backup_manager import BACKUP_ROOT_DIR
|
||||
|
||||
MODULE_PATH = Path(__file__).resolve().parent
|
||||
|
||||
# names
|
||||
MOONRAKER_CFG_NAME = "moonraker.conf"
|
||||
MOONRAKER_LOG_NAME = "moonraker.log"
|
||||
MOONRAKER_SERVICE_NAME = "moonraker.service"
|
||||
MOONRAKER_DEFAULT_PORT = 7125
|
||||
MOONRAKER_ENV_FILE_NAME = "moonraker.env"
|
||||
|
||||
# directories
|
||||
MOONRAKER_DIR = Path.home().joinpath("moonraker")
|
||||
MOONRAKER_ENV_DIR = Path.home().joinpath("moonraker-env")
|
||||
MOONRAKER_BACKUP_DIR = BACKUP_ROOT_DIR.joinpath("moonraker-backups")
|
||||
MOONRAKER_DB_BACKUP_DIR = BACKUP_ROOT_DIR.joinpath("moonraker-db-backups")
|
||||
MOONRAKER_REQUIREMENTS_TXT = MOONRAKER_DIR.joinpath(
|
||||
"scripts/moonraker-requirements.txt"
|
||||
)
|
||||
DEFAULT_MOONRAKER_PORT = 7125
|
||||
|
||||
# files
|
||||
MOONRAKER_REQ_FILE = MOONRAKER_DIR.joinpath("scripts/moonraker-requirements.txt")
|
||||
# introduced due to
|
||||
# https://github.com/Arksine/moonraker/issues/349
|
||||
# https://github.com/Arksine/moonraker/pull/346
|
||||
@@ -29,5 +35,8 @@ POLKIT_LEGACY_FILE = Path("/etc/polkit-1/localauthority/50-local.d/10-moonraker.
|
||||
POLKIT_FILE = Path("/etc/polkit-1/rules.d/moonraker.rules")
|
||||
POLKIT_USR_FILE = Path("/usr/share/polkit-1/rules.d/moonraker.rules")
|
||||
POLKIT_SCRIPT = Path.home().joinpath("moonraker/scripts/set-policykit-rules.sh")
|
||||
MOONRAKER_SERVICE_TEMPLATE = MODULE_PATH.joinpath(f"assets/{MOONRAKER_SERVICE_NAME}")
|
||||
MOONRAKER_ENV_FILE_TEMPLATE = MODULE_PATH.joinpath(f"assets/{MOONRAKER_ENV_FILE_NAME}")
|
||||
|
||||
|
||||
EXIT_MOONRAKER_SETUP = "Exiting Moonraker setup ..."
|
||||
|
||||
Reference in New Issue
Block a user