You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
453 B
11 lines
453 B
3 years ago
|
cd /home/sigonasr2/GiteaMailNotifications
|
||
|
CURRENT=$(curl -s -D - -o /dev/null 'http://sig.projectdivar.com/api/v1/admin/users' -H 'accept: application/json' -H 'authorization: Basic $(cat .APIKEY)' | 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
|