Created
March 2, 2023 18:45
-
-
Save cetteup/12ed4b5b4eda56c65421302c7ebfc262 to your computer and use it in GitHub Desktop.
Run a Battlefield 2 server as a systemd service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Battlefield 2 dedicated server with BF2CC | |
After=network-online.target | |
[Install] | |
WantedBy=multi-user.target | |
[Service] | |
Type=simple | |
# You need to to configure <GameExecArgs>+noStatusMonitor 1</GameExecArgs> in BF2CC's config.xml, default is <GameExecArgs /> | |
WorkingDirectory=path_to_bf2_folder | |
ExecStart=/usr/bin/mono paht_to_bf2ccd.exe -autostart -showlog | |
Restart=always | |
RestartSec=15s | |
TimeoutStopSec=5s | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=%n | |
User=some_non_privileged_user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Battlefield 2 dedicated server | |
After=network-online.target | |
[Install] | |
WantedBy=multi-user.target | |
[Service] | |
Type=simple | |
WorkingDirectory=path_to_bf2_folder | |
ExecStart=path_to_bf2_start.sh +noStatusMonitor 1 | |
Restart=always | |
RestartSec=15s | |
TimeoutStopSec=5s | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=%n | |
User=some_non_privileged_user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment