Bernd Matthießen Posted September 1, 2023 Share Posted September 1, 2023 Hi zusammen, ich würde gerne eine Mail nach dem Ausführen eines User Scripts versenden. Gibt es dazu einen speziellen Unraid Befehl oder muss das mit dem Kommando sendmail laufen? Wenn ja, hätte mal einer ein Beispiel für mich? Danke! Gruß Bernd Quote Link to comment
Solution cz13 Posted September 1, 2023 Solution Share Posted September 1, 2023 Im Backup Script von mgutt werden die emails über die unraid notification verschickt: # notification if [[ $message == "Error"* ]]; then notify "Backup failed!" "$message" elif [ "$notification_success" == 1 ]; then notify "Backup done." "$message" fi quelle: 1 Quote Link to comment
Bernd Matthießen Posted September 1, 2023 Author Share Posted September 1, 2023 Danke, das hat mir geholfen! Hier jetzt meine Lösung, welche ich in den Scripten verwende: /usr/local/emhttp/webGui/scripts/notify -i "xxxx" -s "xxxx" -d "xxxx" -m "xxxx" Bitte die entsprechenden Infos eintragen (bei den xxxx). Hier eine Auflistung (kann man auch sehen, wenn man die Datei /usr/local/emhttp/webGui/scripts/notify öffnet): notify [-e "event"] [-s "subject"] [-d "description"] [-i "normal|warning|alert"] [-m "message"] [-x] [-t] [-b] [add] create a notification use -e to specify the event use -s to specify a subject use -d to specify a short description use -i to specify the severity use -m to specify a message (long description) use -l to specify a link (clicking the notification will take you to that location) use -x to create a single notification ticket use -r to specify recipients and not use default use -t to force send email only (for testing) use -b to NOT send a browser notification all options are optional Danke noch mal!! Gruß Bernd 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.