Use consistent xmpp name

This commit is contained in:
Bob Mottram 2016-10-01 20:20:02 +01:00
parent 1bd6858b28
commit 56954a59bb
3 changed files with 15 additions and 14 deletions

View File

@ -200,17 +200,17 @@ chown $MY_USERNAME:$MY_USERNAME $MY_GPG_PUBLIC_KEY
chmod 600 /home/$MY_USERNAME/README
if grep -q "install_xmpp" $COMPLETION_FILE; then
echo $"Adding an XMPP account for $MY_USERNAME"
echo $"Adding an xmpp account for $MY_USERNAME"
${PROJECT_NAME}-addxmpp -e "$MY_USERNAME@$HOSTNAME" -p "$NEW_USER_PASSWORD"
if [ ! "$?" = "0" ]; then
echo $"XMPP account not created"
echo $"xmpp account not created"
userdel -r $MY_USERNAME
exit 8
fi
fi
if grep -q "install_xmpp_client" $COMPLETION_FILE; then
echo $"Adding XMPP client setup"
echo $"Adding xmpp client setup"
XMPP_CLIENT_DIR=/home/$MY_USERNAME/.local/share/profanity
XMPP_CLIENT_ACCOUNTS=$XMPP_CLIENT_DIR/accounts
if [ ! -d $XMPP_CLIENT_DIR ]; then

View File

@ -136,7 +136,7 @@ function backup_local_xmpp {
function restore_local_xmpp {
if [ -d /var/lib/prosody ]; then
echo $"Restoring XMPP settings"
echo $"Restoring xmpp settings"
temp_restore_dir=/root/tempxmpp
function_check restore_directory_from_usb
restore_directory_from_usb $temp_restore_dir xmpp
@ -151,21 +151,21 @@ function restore_local_xmpp {
rm -rf $temp_restore_dir
service prosody restart
chown -R prosody:prosody /var/lib/prosody/*
echo $"Restore of XMPP settings complete"
echo $"Restore of xmpp settings complete"
fi
}
function backup_remote_xmpp {
if [ -d /var/lib/prosody ]; then
echo $"Backing up the XMPP settings"
echo $"Backing up the xmpp settings"
backup_directory_to_friend /var/lib/prosody xmpp
echo $"Backup of XMPP settings complete"
echo $"Backup of xmpp settings complete"
fi
}
function restore_remote_xmpp {
if [ -d /var/lib/prosody ]; then
echo $"Restoring XMPP settings"
echo $"Restoring xmpp settings"
temp_restore_dir=/root/tempxmpp
function_check restore_directory_from_friend
restore_directory_from_friend $temp_restore_dir xmpp
@ -176,7 +176,7 @@ function restore_remote_xmpp {
rm -rf $temp_restore_dir
service prosody restart
chown -R prosody:prosody /var/lib/prosody/*
echo $"Restore of XMPP settings complete"
echo $"Restore of xmpp settings complete"
fi
}
@ -237,7 +237,7 @@ function remove_xmpp {
fi
sed '/install_xmpp/d' $COMPLETION_FILE
sed '/XMPP /d' $COMPLETION_FILE
sed '/xmpp /d' $COMPLETION_FILE
}
function xmpp_email_headers {
@ -373,21 +373,21 @@ function install_xmpp_main {
touch /home/$MY_USERNAME/README
if [ ! -d /var/lib/tor ]; then
echo $'No Tor installation found. XMPP onion site cannot be configured.'
echo $'No Tor installation found. xmpp onion site cannot be configured.'
exit 877367
fi
if ! grep -q "hidden_service_xmpp" /etc/tor/torrc; then
echo 'HiddenServiceDir /var/lib/tor/hidden_service_xmpp/' >> /etc/tor/torrc
echo "HiddenServicePort 5222 127.0.0.1:5222" >> /etc/tor/torrc
echo "HiddenServicePort 5269 127.0.0.1:5269" >> /etc/tor/torrc
echo $'Added onion site for XMPP chat'
echo $'Added onion site for xmpp chat'
fi
systemctl restart tor
wait_for_onion_service 'xmpp'
if [ ! -f /var/lib/tor/hidden_service_xmpp/hostname ]; then
echo $'XMPP onion site hostname not found'
echo $'xmpp onion site hostname not found'
exit 65349
fi
XMPP_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_xmpp/hostname)
@ -402,7 +402,7 @@ function install_xmpp_main {
sed -i "s|xmpp onion domain.*|xmpp onion domain:${XMPP_ONION_HOSTNAME}|g" $COMPLETION_FILE
fi
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 [ -f $IMAGE_PASSWORD_FILE ]; then
XMPP_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"

View File

@ -67,6 +67,7 @@ function upgrade_installation_from_previous_versions {
sed -i 's|intrusion_detection|install_tripwire|g' $COMPLETION_FILE
sed -i 's|GNU Social|gnusocial|g' $COMPLETION_FILE
sed -i 's|XMPP|xmpp|g' $COMPLETION_FILE
if [ -f /usr/local/bin/zeronetavahi ]; then
rm /usr/local/bin/zeronetavahi