Skip to content

Instantly share code, notes, and snippets.

@Xmonpl
Last active November 26, 2025 00:03
Show Gist options
  • Select an option

  • Save Xmonpl/3c8585d34c83459ac6a3be1f8cb5d129 to your computer and use it in GitHub Desktop.

Select an option

Save Xmonpl/3c8585d34c83459ac6a3be1f8cb5d129 to your computer and use it in GitHub Desktop.
Discord notification for OpenMediaVault
#!/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
@gael-vanderlee
Copy link

@beppefiocco Tysm, your solution worked great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment