Skip to content

Commit 84cde95

Browse files
committed
refactor(stop): share player-online check + add stoponlyifnoplayersallcommands
- Extract the duplicated gamedig player-count query (previously copy-pasted in command_stop, command_restart and command_monitor) into a new shared check_players_online.sh module that sets ${playersonline}; registered in core_modules.sh. - Add stoponlyifnoplayersallcommands (default on) so the stoponlyifnoplayers protection applies to every command that stops the server (e.g. update). Set to off to limit it to explicit stop/restart, allowing update to stop the server even while players are online. - Add the new setting to all game server _default.cfg files. - Resolve merge with develop (check_gamedig now keeps develop's npm-update branch plus the 'install Node.js' hint).
1 parent 5faaf46 commit 84cde95

139 files changed

Lines changed: 189 additions & 44 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lgsm/config-default/config-lgsm/ahl2server/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ curlcustomstring=""
109109

110110
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
111111
stoponlyifnoplayers="off"
112+
stoponlyifnoplayersallcommands="on"
112113

113114
## Updating | https://docs.linuxgsm.com/commands/update
114115
updateonstart="off"

lgsm/config-default/config-lgsm/ahlserver/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ curlcustomstring=""
104104

105105
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
106106
stoponlyifnoplayers="off"
107+
stoponlyifnoplayersallcommands="on"
107108

108109
## Updating | https://docs.linuxgsm.com/commands/update
109110
updateonstart="off"

lgsm/config-default/config-lgsm/arkserver/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ curlcustomstring=""
106106

107107
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
108108
stoponlyifnoplayers="off"
109+
stoponlyifnoplayersallcommands="on"
109110

110111
## Updating | https://docs.linuxgsm.com/commands/update
111112
updateonstart="off"

lgsm/config-default/config-lgsm/arma3server/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ curlcustomstring=""
120120

121121
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
122122
stoponlyifnoplayers="off"
123+
stoponlyifnoplayersallcommands="on"
123124

124125
## Updating | https://docs.linuxgsm.com/commands/update
125126
updateonstart="off"

lgsm/config-default/config-lgsm/armarserver/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ curlcustomstring=""
105105

106106
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
107107
stoponlyifnoplayers="off"
108+
stoponlyifnoplayersallcommands="on"
108109

109110
## Updating | https://docs.linuxgsm.com/commands/update
110111
updateonstart="off"

lgsm/config-default/config-lgsm/atsserver/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ curlcustomstring=""
9797

9898
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
9999
stoponlyifnoplayers="off"
100+
stoponlyifnoplayersallcommands="on"
100101

101102
## Updating | https://docs.linuxgsm.com/commands/update
102103
updateonstart="off"

lgsm/config-default/config-lgsm/avserver/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ curlcustomstring=""
9797

9898
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
9999
stoponlyifnoplayers="off"
100+
stoponlyifnoplayersallcommands="on"
100101

101102
## Updating | https://docs.linuxgsm.com/commands/update
102103
updateonstart="off"

lgsm/config-default/config-lgsm/bb2server/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ curlcustomstring=""
110110

111111
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
112112
stoponlyifnoplayers="off"
113+
stoponlyifnoplayersallcommands="on"
113114

114115
## Updating | https://docs.linuxgsm.com/commands/update
115116
updateonstart="off"

lgsm/config-default/config-lgsm/bbserver/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ curlcustomstring=""
104104

105105
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
106106
stoponlyifnoplayers="off"
107+
stoponlyifnoplayersallcommands="on"
107108

108109
## Updating | https://docs.linuxgsm.com/commands/update
109110
updateonstart="off"

lgsm/config-default/config-lgsm/bdserver/_default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ curlcustomstring=""
104104

105105
## Stop | https://docs.linuxgsm.com/commands/start-stop-restart
106106
stoponlyifnoplayers="off"
107+
stoponlyifnoplayersallcommands="on"
107108

108109
## Updating | https://docs.linuxgsm.com/commands/update
109110
updateonstart="off"

0 commit comments

Comments
 (0)