I write a small bash script who check the latest stable Nextcloud server version available and notify me
I would like the script notify me with "notify-send" command only if the server version number change.
My simple script :
#!/bin/bash
# The latest stable version of Nextcloud server in a variable
LatestStableVersion=$(curl -s https://nextcloud.com/install/ | grep 'Latest stable version:' | awk '{print $18}')
# Notify latest stable version of Nextcloud server
notify-send -u critical -t 12000 "Nextcloud" "New version available : $LatestStableVersion"
I want the notification only if the server number version change in the "$LatestStableVersion" variable. I suppose with "while" loop.
Have you an idea how to do this ?
Thanks