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

Optional debugging for xmpp notifications

parent 9a5f146e
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ SUBJECT=
MESSAGE=
COMPLETION_FILE=/root/${PROJECT_NAME}-completed.txt
local_domain=$HOSTNAME
notification_debug=
function kill_xmppsend_process {
# Sometimes the process can get stuck, so ensure that
......@@ -65,6 +66,12 @@ do
shift
MESSAGE="$1"
;;
-d|--debug)
shift
if [[ "$1" == 'y'* || "$1" == 't'* || "$1" == '1' ]]; then
notification_debug=1
fi
;;
*)
# unknown option
;;
......@@ -132,7 +139,7 @@ if [ -d /etc/prosody ]; then
fi
kill_xmppsend_process
torsocks /usr/local/bin/xmppsend "notification@$local_domain" "$notification_user_password" "$ADMIN_EMAIL_ADDRESS" "$MESSAGE"
torsocks /usr/local/bin/xmppsend "notification@$local_domain" "$notification_user_password" "$ADMIN_EMAIL_ADDRESS" "$MESSAGE" $notification_debug
fi
prosodyctl deluser "notification@$local_domain"
......
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