Last active
February 10, 2026 22:13
-
-
Save senz/8116a2a42770500ced514853054970b2 to your computer and use it in GitHub Desktop.
Gotify integration for OpenMediaVault notifications
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/sh | |
| ## To setup (under root): | |
| ## omv-env set -- OMV_GOTIFY_ENDPOINT <VALUE> | |
| ## omv-env set -- OMV_GOTIFY_TOKEN <VALUE> | |
| ## and put file to: /usr/share/openmediavault/notification/sink.d/98gotify | |
| ## chmod +x /usr/share/openmediavault/notification/sink.d/98gotify | |
| ## see https://docs.openmediavault.org/en/stable/various/advset.html | |
| set -e | |
| . /etc/default/openmediavault | |
| . /usr/share/openmediavault/scripts/helper-functions | |
| omv_checkyesno "${OMV_DEBUG_SCRIPT}" && exit 0 | |
| input=$1 | |
| from=$2 | |
| shift 2 | |
| recipient=$@ | |
| curl "${OMV_GOTIFY_ENDPOINT}/message?token=${OMV_GOTIFY_TOKEN}" -F "message=$(cat $input)" -F "title=${OMV_NOTIFICATION_SUBJECT}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There a typo in line 20/21? There should be no linebreak after 'title' maybe you want to fix it :)
Another hint for people may read this in the future:
curlwas NOT installed in my OMV7 install and so the script did not work before I manually installed it (withapt install curl)