Browse Source

Simplify

stockholm
Bob Mottram 5 years ago
parent
commit
9bcd603d71
  1. 4
      src/freedombone-addxmpp

4
src/freedombone-addxmpp

@ -77,10 +77,10 @@ if [ ! $EMAIL_ADDRESS ]; then
exit 1
fi
USERNAME=$(echo $EMAIL_ADDRESS | awk -F '@' '{print $1}')
if [ ! $NEW_USER_PASSWORD ]; then
prosodyctl adduser $EMAIL_ADDRESS
else
USERNAME=$(echo $EMAIL_ADDRESS | awk -F '@' '{print $1}')
DOMAIN_NAME=$(echo $EMAIL_ADDRESS | awk -F '@' '{print $2}')
prosodyctl register $USERNAME $DOMAIN_NAME "$NEW_USER_PASSWORD"
if [ ! "$?" = "0" ]; then
@ -91,7 +91,7 @@ fi
# add the xmpp address to email headers
if [ -f /home/$USERNAME/.muttrc ]; then
if ! grep -q "Jabber-ID" /home/$USERNAME/.muttrc; then
echo "my_hdr Jabber-ID: ${USERNAME}@${HOSTNAME}" >> /home/$USERNAME/.muttrc
echo "my_hdr Jabber-ID: $EMAIL_ADDRESS" >> /home/$USERNAME/.muttrc
fi
fi

Loading…
Cancel
Save