cd /home/sigonasr2/GiteaMailNotifications CURRENT=$(curl -s -D - -o /dev/null 'http://sig.projectdivar.com/api/v1/admin/users?token='$(cat .APIKEY) -H 'accept: application/json' | grep "X-Total-Count:") PREVIOUS=$(cat registeredusers.data) if [ "$CURRENT" != "$PREVIOUS" ]; then ./notifyregistration.sh echo $CURRENT > registeredusers.data echo "New registration detected. Email sent" else echo "No new users detected." fi