Skip to content
Snippets Groups Projects
Commit d9d3563b authored by Bob Mottram's avatar Bob Mottram
Browse files

Longer pause

parent 248de57d
No related branches found
No related tags found
No related merge requests found
......@@ -83,8 +83,7 @@ fi
if [ -d /etc/prosody ]; then
notification_user_password=$(openssl rand -base64 32 | tr -dc A-Za-z0-9 | head -c 30 ; echo -n '')
prosodyctl deluser "notification@$HOSTNAME" 2> /dev/null
if prosodyctl register "notification" "$HOSTNAME" "$notification_user_password" 2> /dev/null; then
if prosodyctl register "notification" "$HOSTNAME" "$notification_user_password"; then
{ echo '#!/usr/bin/python2';
echo 'import sys,os,xmpp,time';
echo 'tojid = sys.argv[1]';
......@@ -101,14 +100,14 @@ if [ -d /etc/prosody ]; then
echo 'if not auth:';
echo ' sys.exit()';
echo 'id=cl.send(xmpp.protocol.Message(tojid, msg))';
echo 'time.sleep(1)';
echo 'time.sleep(2)';
echo 'cl.disconnect()'; } > /tmp/xsend
chmod +x /tmp/xsend
echo "$MESSAGE" | python2 /tmp/xsend "$ADMIN_EMAIL_ADDRESS"
rm /tmp/xsend
prosodyctl deluser "notification@$HOSTNAME" 2> /dev/null
fi
prosodyctl deluser "notification@$HOSTNAME"
fi
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment