[GH-ISSUE #2145] systemd auto install #1652

Open
opened 2026-02-27 02:58:19 +03:00 by kerem · 4 comments
Owner

Originally created by @dgibbs64 on GitHub (Jan 4, 2019).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/2145

Basic info
Game: LinuxGSM general
Distro: Systemd supported distros

Is your feature request related to a problem? Please describe.
Systemd is the standard way of managing services and starting on boot. However, it is not "simple" to use for a standard admin. It would be a good idea for convenience for the LinuxGSM script to install systemd script specific to itself and be able to also remove the systemd script as well.

Describe the solution you'd like
Automated installation of systemd using a new LinuxGSM command

Describe alternatives you've considered
The admin manually adding the script

Originally created by @dgibbs64 on GitHub (Jan 4, 2019). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/2145 **Basic info** Game: LinuxGSM general Distro: Systemd supported distros **Is your feature request related to a problem? Please describe.** Systemd is the standard way of managing services and starting on boot. However, it is not "simple" to use for a standard admin. It would be a good idea for convenience for the LinuxGSM script to install systemd script specific to itself and be able to also remove the systemd script as well. **Describe the solution you'd like** Automated installation of systemd using a new LinuxGSM command **Describe alternatives you've considered** The admin manually adding the script
Author
Owner

@dgibbs64 commented on GitHub (Jan 4, 2019):

relates to https://github.com/GameServerManagers/LinuxGSM-Docs/pull/3

<!-- gh-comment-id:451424381 --> @dgibbs64 commented on GitHub (Jan 4, 2019): relates to https://github.com/GameServerManagers/LinuxGSM-Docs/pull/3
Author
Owner

@Stormwind99 commented on GitHub (Apr 24, 2019):

I perhaps have some work to better support systemd including multiple server instances per game.

See https://github.com/Stormwind99/LinuxGSM/tree/better-for-systemd

Here is my use case (and thus current test case) for Minecraft, where I have multiple Minecraft servers running. The fork branch above creates a pid file for each server used below in the systemd minecraft.service file, and also makes a separate tmux server instance for each game server instance (so systemd isn't confused by a different slice's process (from another game instance) starting the current slice's process.

[Unit]
Description=Minecraft Server %I
After=network-online.target
Wants=network-online.target

[Service]
Type=forking
User=minecraft
WorkingDirectory=/var/games/minecraft/server/server-%i
ExecStart=/var/games/minecraft/server/server-%i/mcserver-%i start
ExecStop=/var/games/minecraft/server/server-%i/mcserver-%i stop
Restart=on-failure
PIDFile=/var/games/minecraft/server/server-%i/.mcserver-%i.pid

[Install]
WantedBy=multi-user.target
GitHub
Linux Game Server Managers_. Contribute to Stormwind99/LinuxGSM development by creating an account on GitHub.
<!-- gh-comment-id:486021408 --> @Stormwind99 commented on GitHub (Apr 24, 2019): I perhaps have some work to better support systemd including multiple server instances per game. See https://github.com/Stormwind99/LinuxGSM/tree/better-for-systemd Here is my use case (and thus current test case) for Minecraft, where I have multiple Minecraft servers running. The fork branch above creates a pid file for each server used below in the systemd minecraft.service file, and also makes a separate tmux server instance for each game server instance (so systemd isn't confused by a different slice's process (from another game instance) starting the current slice's process. ``` [Unit] Description=Minecraft Server %I After=network-online.target Wants=network-online.target [Service] Type=forking User=minecraft WorkingDirectory=/var/games/minecraft/server/server-%i ExecStart=/var/games/minecraft/server/server-%i/mcserver-%i start ExecStop=/var/games/minecraft/server/server-%i/mcserver-%i stop Restart=on-failure PIDFile=/var/games/minecraft/server/server-%i/.mcserver-%i.pid [Install] WantedBy=multi-user.target ``` <blockquote><img src="https://avatars1.githubusercontent.com/u/9441438?s=400&v=4" width="48" align="right"><div><img src="https://github.githubassets.com/favicon.ico" height="14"> GitHub</div><div><strong><a href="https://github.com/Stormwind99/LinuxGSM">Stormwind99/LinuxGSM</a></strong></div><div>Linux Game Server Managers_. Contribute to Stormwind99/LinuxGSM development by creating an account on GitHub.</div></blockquote>
Author
Owner

@legendofmiracles commented on GitHub (Dec 20, 2020):

very basic implementation in: #3152

<!-- gh-comment-id:748584728 --> @legendofmiracles commented on GitHub (Dec 20, 2020): very basic implementation in: #3152
Author
Owner

@AndrewSav commented on GitHub (Jun 18, 2021):

What happened with 3125?

<!-- gh-comment-id:863929160 --> @AndrewSav commented on GitHub (Jun 18, 2021): What happened with 3125?
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#1652
No description provided.