Remove xmpp entry from readme

This commit is contained in:
Bob Mottram 2016-10-28 09:48:30 +01:00
parent 166204ff5c
commit cca901342b
1 changed files with 3 additions and 6 deletions

View File

@ -287,6 +287,7 @@ function remove_xmpp {
remove_completion_param install_xmpp remove_completion_param install_xmpp
sed -i '/xmpp/d' $COMPLETION_FILE sed -i '/xmpp/d' $COMPLETION_FILE
sed -i '/XMPP/d' /home/$MY_USERNAME/README
} }
function xmpp_email_headers { function xmpp_email_headers {
@ -489,7 +490,7 @@ function install_xmpp_main {
fi fi
set_completion_param "xmpp onion domain" "${XMPP_ONION_HOSTNAME}" set_completion_param "xmpp onion domain" "${XMPP_ONION_HOSTNAME}"
if ! grep -q "Your xmpp password is" /home/$MY_USERNAME/README; then if ! grep -q "Your XMPP password is" /home/$MY_USERNAME/README; then
if [ ${#XMPP_PASSWORD} -lt 8 ]; then if [ ${#XMPP_PASSWORD} -lt 8 ]; then
if [ -f $IMAGE_PASSWORD_FILE ]; then if [ -f $IMAGE_PASSWORD_FILE ]; then
XMPP_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" XMPP_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
@ -500,13 +501,9 @@ function install_xmpp_main {
prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME $XMPP_PASSWORD prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME $XMPP_PASSWORD
echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README
echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README
echo $'XMPP' >> /home/$MY_USERNAME/README echo $'* XMPP' >> /home/$MY_USERNAME/README
echo '====' >> /home/$MY_USERNAME/README
echo $"XMPP onion domain: ${XMPP_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README echo $"XMPP onion domain: ${XMPP_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README
echo $"Your XMPP password is: $XMPP_PASSWORD" >> /home/$MY_USERNAME/README echo $"Your XMPP password is: $XMPP_PASSWORD" >> /home/$MY_USERNAME/README
echo $'You can change it with: ' >> /home/$MY_USERNAME/README
echo '' >> /home/$MY_USERNAME/README
echo " prosodyctl passwd $MY_EMAIL_ADDRESS" >> /home/$MY_USERNAME/README
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
chmod 600 /home/$MY_USERNAME/README chmod 600 /home/$MY_USERNAME/README
fi fi