23
2
Fork 0

Added server-to-many notice script

This commit is contained in:
Adrien Bourmault 2021-01-12 15:46:42 +01:00 committed by root
parent f9bf266511
commit 57e7ec7c7e
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
#!/bin/bash
LIST=$(sudo -u ejabberd ejabberdctl connected_users_info | cut -f 1 | cut -d "/" -f 1 | grep $1 | uniq)
for ADDRESS in $LIST
do
sudo -u ejabberd ejabberdctl send_message headline chapril.org "$ADDRESS" "Annonce du Serveur" "$2"
echo Done with $ADDRESS
done