Install/Upgrade: améliore script, mail si échec

This commit is contained in:
Emmanuel Viennet 2024-08-24 14:49:53 +02:00 committed by Iziram
parent 84580a8a6f
commit 88d9356209

View File

@ -122,3 +122,14 @@ remove_install_status() {
rm -f "${SCODOC_INSTALL_STATUS_FILE}"
fi
}
#
alarm_admin() {
echo "Error: alarm_admin $1"
echo "Sending email to admin..."
echo "Subject: ScoDoc: $1" | mail -s "ScoDoc: $1" root <<EOF
Erreur lors de la mise à jour de ScoDoc sur $(hostname --fqdn)
EOF
}