Last active
November 26, 2025 00:03
-
-
Save Xmonpl/3c8585d34c83459ac6a3be1f8cb5d129 to your computer and use it in GitHub Desktop.
Discord notification for OpenMediaVault
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #CREATED BY XMON FOR OpenMediaVault | |
| DISCORD_WEBHOOK='PUT YOUR WEBHOOK LINK HERE' | |
| generate_post_data() { | |
| cat <<EOF | |
| { | |
| "content": "", | |
| "embeds": [{ | |
| "title": "${OMV_NOTIFICATION_SUBJECT}", | |
| "description": "$(cat ${OMV_NOTIFICATION_MESSAGE_FILE})", | |
| "color": "45973", | |
| "footer": { | |
| "text": "${OMV_NOTIFICATION_DATE}", | |
| "icon_url": "" | |
| } | |
| }] | |
| } | |
| EOF | |
| } | |
| curl -H "Content-Type: application/json" -X POST -d "$(generate_post_data)" $DISCORD_WEBHOOK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@beppefiocco Tysm, your solution worked great.