Showing 1 changed files with 21 additions and 0 deletions
+21
monitoring.d/raspberrypi
... ...
@@ -120,3 +120,24 @@ function piwigo_private () {
120 120
     _turn 20 || return
121 121
     test "$(curl --silent 'http://192.168.0.71/photos/ws.php?format=json&method=pwg.categories.getList' | sum)" = "00569     1" || echo "albums visibles publiquement"
122 122
 }
123
+
124
+function snappymail_version () {
125
+    _turn 24 || return
126
+    local installed_version=$(</var/www/rainloop/data/VERSION)
127
+    local release_url='https://api.github.com/repos/the-djmaze/snappymail/releases/latest'
128
+    local version=$(curl -sL -H "Accept: application/vnd.github+json" $release_url | jq -r '.name | ltrimstr("v")')
129
+    if test $version != $installed_version; then
130
+        echo "nouvelle version dispo: $version"
131
+    fi
132
+}
133
+
134
+function navidrome_version () {
135
+    _turn 24 || return
136
+    local installed_version=$(find ~navidrome/navidrome -printf "%C@")
137
+    local release_url='https://api.github.com/repos/navidrome/navidrome/releases/latest'
138
+    local version=$(curl -sL -H "Accept: application/vnd.github+json" $release_url \
139
+                  | jq -r '.assets | .[] | select(.name | contains("linux_armv7")) | .updated_at | fromdateiso8601')
140
+    if test $version -gt ${installed_version%.*}; then
141
+        echo "nouvelle version dispo"
142
+    fi
143
+}