diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index 5e06f84d66..68486f2334 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -130,6 +130,17 @@ fn_alert_update_linuxgsm() { alertcolourdec="52480" } +fn_alert_backup() { + fn_script_log_info "Sending alert: ${selfname} has been backed up" + alertaction="Backed Up" + alertemoji="📂" + alertsound="1" + alertmessage="${selfname} has been backed up." + # Green + alertcolourhex="#00cd00" + alertcolourdec="52480" +} + fn_alert_permissions() { fn_script_log_info "Sending alert: ${selfname} has permissions issues" alertaction="Checked Permissions" @@ -204,6 +215,8 @@ elif [ "${alert}" == "restarted" ]; then fn_alert_restarted elif [ "${alert}" == "update-linuxgsm" ]; then fn_alert_update_linuxgsm +elif [ "${alert}" == "backup" ]; then + fn_alert_backup else fn_print_fail_nl "Missing alert type" fn_script_log_fatal "Missing alert type" diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index fac5dc38b9..55981e19e5 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -138,6 +138,8 @@ fn_backup_compression() { fn_print_ok_eol fn_print_ok_nl "Completed: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" fn_script_log_pass "Backup created: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" + alert="backup" + alert.sh fi }