Check that xmpp is installed before adding user

This commit is contained in:
Bob Mottram 2015-11-02 10:33:03 +00:00
parent 797a1b9cef
commit 5a0e192f48
1 changed files with 8 additions and 6 deletions

View File

@ -178,12 +178,14 @@ chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
chown $MY_USERNAME:$MY_USERNAME $MY_GPG_PUBLIC_KEY
chmod 600 /home/$MY_USERNAME/README
echo "Adding an XMPP account for $MY_USERNAME"
freedombone-addxmpp -e "$MY_USERNAME@$HOSTNAME" -p "$NEW_USER_PASSWORD"
if [ ! "$?" = "0" ]; then
echo "XMPP account not created"
userdel -r $MY_USERNAME
exit 8
if grep -q "install_xmpp" $COMPLETION_FILE; then
echo "Adding an XMPP account for $MY_USERNAME"
freedombone-addxmpp -e "$MY_USERNAME@$HOSTNAME" -p "$NEW_USER_PASSWORD"
if [ ! "$?" = "0" ]; then
echo "XMPP account not created"
userdel -r $MY_USERNAME
exit 8
fi
fi
if grep -q "Blog domain" $COMPLETION_FILE; then