@@ -18,10 +18,10 @@ fn_monitor_check_monitoring() {
18
18
date ' +%s' > " ${lockdir:? } /${selfname} -monitoring.lock"
19
19
elif [ ! -f " ${lockdir} /${selfname} -monitoring.lock" ]; then
20
20
# Monitor does not run if lockfile is not found.
21
- fn_print_dots " Checking lockfile: "
21
+ fn_print_dots " Checking lockfile"
22
22
fn_print_checking_eol
23
23
fn_script_log_info " Checking lockfile: CHECKING"
24
- fn_print_error " Checking lockfile: No lockfile found: "
24
+ fn_print_error " Checking lockfile: No lockfile found"
25
25
fn_print_error_eol_nl
26
26
fn_script_log_error " Checking lockfile: No lockfile found: ERROR"
27
27
echo -e " * Start ${selfname} to run monitor."
@@ -31,10 +31,10 @@ fn_monitor_check_monitoring() {
31
31
32
32
fn_monitor_check_install () {
33
33
if [ " $( pgrep -fc -u " ${USER} " " /bin/bash ./${selfname} install" ) " != " 0" ] || [ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} i" ) " != " 0" ] || [ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} auto-install" ) " != " 0" ] || [ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} ai" ) " != " 0" ]; then
34
- fn_print_dots " Checking installer: "
34
+ fn_print_dots " Checking installer"
35
35
fn_print_checking_eol
36
36
fn_script_log_info " Checking installer: CHECKING"
37
- fn_print_info " Checking installer: LinuxGSM is installing: "
37
+ fn_print_info " Checking installer: LinuxGSM is installing"
38
38
fn_print_info_eol_nl
39
39
fn_script_log_pass " Checking installer: LinuxGSM is installing"
40
40
core_exit.sh
@@ -43,9 +43,9 @@ fn_monitor_check_install() {
43
43
44
44
fn_monitor_check_debug () {
45
45
if [ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} debug" ) " != " 0" ] || [ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} d" ) " != " 0" ]; then
46
- fn_print_dots " Checking debug: "
46
+ fn_print_dots " Checking debug"
47
47
fn_print_checking_eol
48
- fn_print_info " Checking debug: Debug is running: "
48
+ fn_print_info " Checking debug: Debug is running"
49
49
fn_print_info_eol_nl
50
50
fn_script_log_pass " Checking debug: Debug is running"
51
51
core_exit.sh
@@ -54,9 +54,9 @@ fn_monitor_check_debug() {
54
54
55
55
fn_monitor_check_details () {
56
56
if [ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} details" ) " != " 0" ] || [ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} dt" ) " != " 0" ]; then
57
- fn_print_dots " Checking details: "
57
+ fn_print_dots " Checking details"
58
58
fn_print_checking_eol
59
- fn_print_info " Checking details: Details is running: "
59
+ fn_print_info " Checking details: Details is running"
60
60
fn_print_info_eol_nl
61
61
fn_script_log_pass " Checking details: Details is running"
62
62
core_exit.sh
@@ -67,19 +67,19 @@ fn_monitor_check_starting() {
67
67
# Remove stale lockfile.
68
68
if [ -f " ${lockdir} /${selfname} -starting.lock" ]; then
69
69
if [ " $( find " ${lockdir} /${selfname} -starting.lock" -mmin +5) " ]; then
70
- fn_print_dots " Checking start: "
70
+ fn_print_dots " Checking start"
71
71
fn_print_checking_eol
72
- fn_print_warn " Checking start: Removing stale lockfile: "
72
+ fn_print_warn " Checking start: Removing stale lockfile"
73
73
fn_print_warn_eol_nl
74
74
fn_script_log_warn " Checking start: Removing stale lockfile"
75
75
rm -f " ${lockdir:? } /${selfname} -starting.lock"
76
76
fi
77
77
fi
78
78
79
79
if [ -f " ${lockdir} /${selfname} -starting.lock" ] && [[ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} start" ) " != " 0" || " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} s" ) " != " 0" ]]; then
80
- fn_print_dots " Checking start: "
80
+ fn_print_dots " Checking start"
81
81
fn_print_checking_eol
82
- fn_print_info " Checking start: LinuxGSM is starting: "
82
+ fn_print_info " Checking start: LinuxGSM is starting"
83
83
fn_print_info_eol_nl
84
84
fn_script_log_info " Checking backup: LinuxGSM is starting"
85
85
core_exit.sh
@@ -90,19 +90,19 @@ fn_monitor_check_stopping() {
90
90
# Remove stale lockfile.
91
91
if [ -f " ${lockdir} /${selfname} -stopping.lock" ]; then
92
92
if [ " $( find " ${lockdir} /${selfname} -stopping.lock" -mmin +5) " ]; then
93
- fn_print_dots " Checking stop: "
93
+ fn_print_dots " Checking stop"
94
94
fn_print_checking_eol
95
- fn_print_warn " Checking stop: Removing stale lockfile: "
95
+ fn_print_warn " Checking stop: Removing stale lockfile"
96
96
fn_print_warn_eol_nl
97
97
fn_script_log_warn " Checking stop: Removing stale lockfile"
98
98
rm -f " ${lockdir:? } /${selfname} -stopping.lock"
99
99
fi
100
100
fi
101
101
102
102
if [ -f " ${lockdir} /${selfname} -stopping.lock" ] && [[ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} stop" ) " != " 0" || " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} s" ) " != " 0" ]]; then
103
- fn_print_dots " Checking stop: "
103
+ fn_print_dots " Checking stop"
104
104
fn_print_checking_eol
105
- fn_print_info " Checking stop: LinuxGSM is stopping: "
105
+ fn_print_info " Checking stop: LinuxGSM is stopping"
106
106
fn_print_info_eol_nl
107
107
fn_script_log_info " Checking backup: LinuxGSM is stopping"
108
108
core_exit.sh
@@ -113,19 +113,19 @@ fn_monitor_check_backup() {
113
113
# Remove stale lockfile.
114
114
if [ -f " ${lockdir} /backup.lock" ]; then
115
115
if [ " $( find " ${lockdir} /backup.lock" -mmin +60) " ]; then
116
- fn_print_dots " Checking backup: "
116
+ fn_print_dots " Checking backup"
117
117
fn_print_checking_eol
118
- fn_print_warn " Checking backup: Removing stale lockfile: "
118
+ fn_print_warn " Checking backup: Removing stale lockfile"
119
119
fn_print_warn_eol
120
120
fn_script_log_warn " Checking backup: Removing stale lockfile"
121
121
rm -f " ${lockdir:? } /backup.lock"
122
122
fi
123
123
fi
124
124
125
125
if [ -f " ${lockdir} /backup.lock" ] && [[ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} backup" ) " != " 0" || " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} b" ) " != " 0" ]]; then
126
- fn_print_dots " Checking backup: "
126
+ fn_print_dots " Checking backup"
127
127
fn_print_checking_eol
128
- fn_print_info " Checking backup: Backup is running: "
128
+ fn_print_info " Checking backup: Backup is running"
129
129
fn_print_info_eol_nl
130
130
fn_script_log_info " Checking backup: Backup is running"
131
131
core_exit.sh
@@ -136,19 +136,19 @@ fn_monitor_check_update() {
136
136
# Remove stale lockfile.
137
137
if [ -f " ${lockdir} /update.lock" ]; then
138
138
if [ " $( find " ${lockdir} /update.lock" -mmin +15) " ]; then
139
- fn_print_dots " Checking update: "
139
+ fn_print_dots " Checking update"
140
140
fn_print_checking_eol
141
- fn_print_warn " Checking update: Removing stale lockfile: "
141
+ fn_print_warn " Checking update: Removing stale lockfile"
142
142
fn_print_warn_eol_nl
143
143
fn_script_log_warn " Checking update: Removing stale lockfile"
144
144
rm -f " ${lockdir:? } /update.lock"
145
145
fi
146
146
fi
147
147
148
148
if [ -f " ${lockdir} /update.lock" ] && [[ " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} update" ) " != " 0" || " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} validate" ) " != " 0" || " $( pgrep -fcx -u " ${USER} " " /bin/bash ./${selfname} v" ) " != " 0" || " $( pgrep -fc force-update " ${USER} " " /bin/bash ./${selfname} fu" ) " != " 0" ]]; then
149
- fn_print_dots " Checking update: "
149
+ fn_print_dots " Checking update"
150
150
fn_print_checking_eol
151
- fn_print_info " Checking update: LinuxGSM is updating the game server: "
151
+ fn_print_info " Checking update: LinuxGSM is updating the game server"
152
152
fn_print_info_eol_nl
153
153
fn_script_log_pass " Checking update: LinuxGSM is updating the game server"
154
154
core_exit.sh
@@ -159,10 +159,10 @@ fn_monitor_check_update() {
159
159
fn_monitor_check_update_source () {
160
160
if [ -f " ${consolelogdir} /${selfname} -console.log" ] && [ " ${engine} " == " source" ]; then
161
161
if grep -q " Your server needs to be restarted in order to receive the latest update." " ${consolelogdir} /${selfname} -console.log" ; then
162
- fn_print_dots " Checking update: "
162
+ fn_print_dots " Checking update"
163
163
fn_print_checking_eol
164
164
fn_script_log_info " Checking update: CHECKING"
165
- fn_print_ok " Checking update: "
165
+ fn_print_ok " Checking update"
166
166
fn_print_ok_eol_nl
167
167
fn_script_log_info " Checking update: ${selfname} has requested an update and needs to be restarted"
168
168
alert=" update-request"
@@ -182,7 +182,7 @@ fn_monitor_check_session() {
182
182
sessionheight=" 23"
183
183
# Check for PIDS with identical tmux sessions running.
184
184
if [ " $( pgrep -fcx " tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname} " ) " -ge " 2" ]; then
185
- fn_print_error " Checking session: There are PIDS with identical tmux sessions running: "
185
+ fn_print_error " Checking session: There are PIDS with identical tmux sessions running"
186
186
fn_print_error_eol_nl
187
187
fn_script_log_error " Checking session: ERROR"
188
188
fn_script_log_error " Checking session: There are PIDS with identical tmux sessions running"
@@ -192,7 +192,7 @@ fn_monitor_check_session() {
192
192
core_exit.sh
193
193
# Check for tmux pids with the same tmux session and socket names. This will reduce issues with migration to release v23.5.0. #4296
194
194
elif [ " $( pgrep -fc -u " ${USER} " " tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname} " ) " != " 0" ]; then
195
- fn_print_error " Checking session: PIDS with the same tmux session and socket names are running: "
195
+ fn_print_error " Checking session: PIDS with the same tmux session and socket names are running"
196
196
fn_print_error_eol_nl
197
197
fn_script_log_error " Checking session: ERROR"
198
198
fn_script_log_error " Checking session: PIDS with the same tmux session and socket names are running"
@@ -202,7 +202,7 @@ fn_monitor_check_session() {
202
202
core_exit.sh
203
203
# Check for tmux pids that are using the old type of tmux session. This will reduce issues with migration to release v23.5.0. #4296
204
204
elif [ " $( pgrep -fc -u " ${USER} " " tmux new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname} " ) " != " 0" ]; then
205
- fn_print_error " Checking session: PIDS with old type tmux session are running: "
205
+ fn_print_error " Checking session: PIDS with old type tmux session are running"
206
206
fn_print_error_eol_nl
207
207
fn_script_log_error " Checking session: ERROR"
208
208
fn_script_log_error " Checking session: PIDS with old type tmux session are running"
@@ -233,7 +233,7 @@ fn_monitor_check_session() {
233
233
# Monitor will check queryport is set before continuing.
234
234
fn_monitor_check_queryport () {
235
235
if [ -z " ${queryport} " ] || [ " ${queryport} " == " 0" ]; then
236
- fn_print_dots " Checking port: "
236
+ fn_print_dots " Checking port"
237
237
fn_print_checking_eol
238
238
fn_script_log_info " Checking port: CHECKING"
239
239
if [ -n " ${rconenabled} " ] && [ " ${rconenabled} " != " true" ] && [ " ${shortname} " == " av" ]; then
0 commit comments