Nvchecker gotify notifications cron
This file contains 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 | |
# 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 |
This file contains 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
[__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" |
This file contains 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
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment