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

Silent

parent 283c4500
No related branches found
No related tags found
No related merge requests found
......@@ -1015,7 +1015,7 @@ function install_xmpp {
$INSTALL_PACKAGES lua-sec lua-bitop lua5.1 liblua5.1-dev
$INSTALL_PACKAGES libidn11-dev libssl-dev lua-dbi-sqlite3
$INSTALL_PACKAGES mercurial
$INSTALL_PACKAGES mercurial curl
$INSTALL_PACKAGES prosody
if [ ! -f /usr/bin/hg ]; then
......
......@@ -83,9 +83,10 @@ 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 register "notification" "$HOSTNAME" "$notification_user_password"
curl http://localhost:5280/msg/user -u "notification@$HOSTNAME:$notification_user_password" -H "Content-Type: text/plain" -d "$MESSAGE"
prosodyctl deluser "notification@$HOSTNAME"
if prosodyctl register "notification" "$HOSTNAME" "$notification_user_password" 2> /dev/null; then
curl http://localhost:5280/msg/user -u "notification@$HOSTNAME:$notification_user_password" -H "Content-Type: text/plain" -d "$MESSAGE" 2> /dev/null
prosodyctl deluser "notification@$HOSTNAME" 2> /dev/nul
fi
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