diff --git a/dependencies.txt b/dependencies.txt new file mode 100644 index 0000000..9bf9aac --- /dev/null +++ b/dependencies.txt @@ -0,0 +1,13 @@ +Required OS packages for Ubuntu: +# dpkg --add-architecture i386 +# apt update +# apt install unzip xvfb python3-pip wine32 cpulimit +# pip3 install tqdm + +Required OS packages for RHEL 8: +# dnf install epel-repo +# dnf install wine-core unzip xorg-x11-server-Xvfb + +Required OS packages for RHEL 7: +# yum install epel-repo +# yum install wine-core unzip xorg-x11-server-Xvfb \ No newline at end of file diff --git a/etc/systemd/system/t2server.service b/etc/systemd/system/t2server.service index 70b87cb..355a51e 100644 --- a/etc/systemd/system/t2server.service +++ b/etc/systemd/system/t2server.service @@ -18,8 +18,6 @@ RestartSec=15s TimeoutStopSec=60s WorkingDirectory=/opt/t2server/GameData LogsDirectory=t2server - -# Below settings help lock down the service for security ProtectSystem=full ProtectHome=true SystemCallFilter=@system-service diff --git a/usr/local/bin/t2server b/usr/local/bin/t2server index bc0498e..843e7c6 100755 --- a/usr/local/bin/t2server +++ b/usr/local/bin/t2server @@ -73,10 +73,10 @@ def server_files(config): for mission in config["MapList"]: mlist.write(f"{config['MissionType']} {mission}\n") else: - if isfile(f"{install_dir}/GameData/base/prefs/missions.txt"): - print(f"Purging {install_dir}/GameData/base/prefs/missions.txt") - # missions.txt needs to exist or the missioncycle.cs script will hang, so overwrite with an empty file - open(f"{install_dir}/GameData/base/prefs/missions.txt", 'w').close() + # missions.txt needs to exist or the missioncycle.cs script will hang, so create/overwrite with an empty file + print(f"Purging {install_dir}/GameData/base/prefs/missions.txt") + with open(f"{install_dir}/GameData/base/prefs/missions.txt", 'w') as mlist: + mlist.write("") def runaway_control(): @@ -154,7 +154,6 @@ if __name__ == "__main__": # Merge config_defaults and loaded_config, with loaded_config taking precedence where there are conflicts. # This ensures there are no undefined values in the case of a user removing one from config.yaml. config = {**config_defaults, **loaded_config} - print(config) # Validate the mod directory and serverprefs file if not isdir(f"{install_dir}/GameData/{config['Mod']}"):