Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nvchecker gotify notifications cron
#!/bin/bash
# Note: an empty json file at old_ver.json should exist before running this
cd "$(dirname "$0")"
nvchecker -l error -c nvchecker.toml
VAR="`nvcmp -c nvchecker.toml`"
url="https://gotify.example.com"
token="A123ABC.DEF"
if [ -z "$VAR" ]
then
curl "$url/message?token=$token" -F "title=no nvchecker updates" -F "message=no nvchecker updates" -F "priority=1"
else
curl "$url/message?token=$token" -F "title=nvchecker has updates" -F "message=$VAR" -F "priority=6"
fi
\cp -f new_ver.json old_ver.json
[__config__]
oldver = "old_ver.json"
newver = "new_ver.json"
[hyperspace]
source = "github"
github="hyperspacedev/hyperspace"
use_latest_release=true
[gotify-dunst]
source="github"
github="ztpnk/gotify-dunst"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.