Daniel Gibbs 4 лет назад
Родитель
Сommit
74bad97901
2 измененных файлов с 13 добавлено и 0 удалено
  1. 11 0
      lgsm/functions/alert.sh
  2. 2 0
      lgsm/functions/command_wipe.sh

+ 11 - 0
lgsm/functions/alert.sh

@@ -88,6 +88,15 @@ fn_alert_config(){
 	alertbody="${selfname} has received a new _default.cfg. Check file for changes."
 }
 
+fn_alert_wipe(){
+	fn_script_log_info "Sending alert: Wiped: ${executable} not running"
+	alertsubject="Alert - ${selfname} - Wiped"
+	alertemoji="💿"
+	alertsound="1"
+	alerturl="not enabled"
+	alertbody="${selfname} as been wiped."
+}
+
 # Gather info required for alert.
 info_distro.sh
 info_game.sh
@@ -152,6 +161,8 @@ elif [ "${alert}" == "check-update" ]; then
 	fn_alert_check_update
 elif [ "${alert}" == "config" ]; then
 	fn_alert_config
+elif [ "${alert}" == "wipe" ]; then
+	fn_alert_wipe
 fi
 
 # Generate alert log.

+ 2 - 0
lgsm/functions/command_wipe.sh

@@ -173,6 +173,8 @@ if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]||[ -n "$(find "
 	else
 		fn_wipe_files
 		fn_wipe_random_seed
+		alert="wipe"
+		alert.sh
 		fn_print_complete_nl "${wipetype}"
 		fn_script_log_pass "${wipetype}"
 	fi