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

This commit is contained in:
Emmanuel Viennet 2024-08-24 14:49:53 +02:00
parent ebd71a3299
commit d46e77b48a

View File

@ -122,3 +122,14 @@ remove_install_status() {
rm -f "${SCODOC_INSTALL_STATUS_FILE}" rm -f "${SCODOC_INSTALL_STATUS_FILE}"
fi 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
}