Browse Source

feat: monitor will now force an update if source servers request it

pull/4360/head
Daniel Gibbs 1 year ago
parent
commit
c51734f595
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 15
      lgsm/modules/alert.sh
  2. 6
      lgsm/modules/command_monitor.sh

15
lgsm/modules/alert.sh

@ -107,9 +107,20 @@ fn_alert_update() {
alertcolourdec="52480"
}
fn_alert_update_request() {
fn_script_log_info "Sending alert: ${selfname} has requested an update and needs to be restarted."
alertaction="Updating"
alertemoji="🎉"
alertsound="1"
alertmessage="${selfname} has requested an update and needs to be restarted."
# Blue
alertcolourhex="#1e90ff"
alertcolourdec="2003199"
}
fn_alert_check_update() {
fn_script_log_info "Sending alert: ${gamename} update available: ${remotebuildversion}"
alertaction="Checked for Update"
alertaction="Update available"
alertemoji="🎉"
alertsound="1"
alertmessage="${gamename} update available: ${remotebuildversion}"
@ -199,6 +210,8 @@ elif [ "${alert}" == "test" ]; then
fn_alert_test
elif [ "${alert}" == "update" ]; then
fn_alert_update
elif [ "${alert}" == "update-request" ]; then
fn_alert_update_request
elif [ "${alert}" == "check-update" ]; then
fn_alert_check_update
elif [ "${alert}" == "config" ]; then

6
lgsm/modules/command_monitor.sh

@ -153,10 +153,10 @@ fn_monitor_check_update_source() {
fn_script_log_info "Checking update: CHECKING"
fn_print_ok "Checking update: "
fn_print_ok_eol_nl
fn_script_log_info "Checking update: Monitor is restarting ${selfname} to apply update"
alert="update"
fn_script_log_info "Checking update: ${selfname} has requested an update and needs to be restarted"
alert="update-request"
alert.sh
command_restart.sh
command_update.sh
core_exit.sh
fi
fi

Loading…
Cancel
Save