Created
November 9, 2020 06:30
-
-
Save karmanyaahm/02bfb452b8e78a373b53bb78df5334a3 to your computer and use it in GitHub Desktop.
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