Merge remote-tracking branch 'origin/feature-mail-optional' into develop
This commit is contained in:
commit
1d52508d77
@ -4,8 +4,9 @@
|
|||||||
|
|
||||||
#on_exit [error_level]
|
#on_exit [error_level]
|
||||||
function on_exit() {
|
function on_exit() {
|
||||||
|
### send mail
|
||||||
|
[ -n "$log_mail_aim" ] && {
|
||||||
#send log and errorlevel[success/errorr xy]
|
#send log and errorlevel[success/errorr xy]
|
||||||
|
|
||||||
if [ "$1" != "0" ]; then
|
if [ "$1" != "0" ]; then
|
||||||
log_mail_subject="$log_mail_subject [ERROR]"
|
log_mail_subject="$log_mail_subject [ERROR]"
|
||||||
else
|
else
|
||||||
@ -20,7 +21,9 @@ function on_exit() {
|
|||||||
cat "$log_file"
|
cat "$log_file"
|
||||||
} | sendemail -s "$log_mail_smtp" -f "$log_mail_source" -t "$mail_aim" -u "$log_mail_subject" -o tls=no
|
} | sendemail -s "$log_mail_smtp" -f "$log_mail_source" -t "$mail_aim" -u "$log_mail_subject" -o tls=no
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
### clean up
|
||||||
[ "$1" != "0" ] && {
|
[ "$1" != "0" ] && {
|
||||||
chroot_umount$distro "$chroot_path" 2> /dev/null
|
chroot_umount$distro "$chroot_path" 2> /dev/null
|
||||||
workspace_erase "$iso_extr_dir/" "$chroot_path/" 2> /dev/null
|
workspace_erase "$iso_extr_dir/" "$chroot_path/" 2> /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user