mirror of
https://gitea.tendokyu.moe/beerpsi/artemis-portable.git
synced 2026-10-01 03:07:56 +03:00
40 lines
805 B
Python
40 lines
805 B
Python
# This should be run with ARTEMiS's venv instead of the system Python
|
|
import os
|
|
import sys
|
|
import yaml
|
|
|
|
core_config_path = os.path.join(os.getcwd(), sys.argv[1])
|
|
mariadb_password = sys.argv[2]
|
|
mariadb_port = int(sys.argv[3])
|
|
|
|
with open(core_config_path) as f:
|
|
config = yaml.safe_load(f)
|
|
|
|
config["server"].update(
|
|
{
|
|
"listen_address": "0.0.0.0",
|
|
"is_develop": False,
|
|
"threading": True,
|
|
}
|
|
)
|
|
|
|
config["title"].update(
|
|
{
|
|
"reboot_start_time": "",
|
|
"reboot_end_time": "",
|
|
}
|
|
)
|
|
|
|
config["database"].update(
|
|
{
|
|
"password": mariadb_password,
|
|
"port": mariadb_port,
|
|
"enable_memcached": False,
|
|
}
|
|
)
|
|
|
|
config["aimedb"]["key"] = "Copyright(C)SEGA"
|
|
|
|
with open(core_config_path, "w") as f:
|
|
yaml.safe_dump(config, f, sort_keys=False)
|