Browse Source

Use consistent xmpp name

Bob Mottram 8 years ago
parent
commit
56954a59bb
3 changed files with 15 additions and 14 deletions
  1. 3
    3
      src/freedombone-adduser
  2. 11
    11
      src/freedombone-app-xmpp
  3. 1
    0
      src/freedombone-utils-upgrade

+ 3
- 3
src/freedombone-adduser View File

@@ -200,17 +200,17 @@ chown $MY_USERNAME:$MY_USERNAME $MY_GPG_PUBLIC_KEY
200 200
 chmod 600 /home/$MY_USERNAME/README
201 201
 
202 202
 if grep -q "install_xmpp" $COMPLETION_FILE; then
203
-    echo $"Adding an XMPP account for $MY_USERNAME"
203
+    echo $"Adding an xmpp account for $MY_USERNAME"
204 204
     ${PROJECT_NAME}-addxmpp -e "$MY_USERNAME@$HOSTNAME" -p "$NEW_USER_PASSWORD"
205 205
     if [ ! "$?" = "0" ]; then
206
-        echo $"XMPP account not created"
206
+        echo $"xmpp account not created"
207 207
         userdel -r $MY_USERNAME
208 208
         exit 8
209 209
     fi
210 210
 fi
211 211
 
212 212
 if grep -q "install_xmpp_client" $COMPLETION_FILE; then
213
-    echo $"Adding XMPP client setup"
213
+    echo $"Adding xmpp client setup"
214 214
     XMPP_CLIENT_DIR=/home/$MY_USERNAME/.local/share/profanity
215 215
     XMPP_CLIENT_ACCOUNTS=$XMPP_CLIENT_DIR/accounts
216 216
     if [ ! -d $XMPP_CLIENT_DIR ]; then

+ 11
- 11
src/freedombone-app-xmpp View File

@@ -136,7 +136,7 @@ function backup_local_xmpp {
136 136
 
137 137
 function restore_local_xmpp {
138 138
     if [ -d /var/lib/prosody ]; then
139
-        echo $"Restoring XMPP settings"
139
+        echo $"Restoring xmpp settings"
140 140
         temp_restore_dir=/root/tempxmpp
141 141
         function_check restore_directory_from_usb
142 142
         restore_directory_from_usb $temp_restore_dir xmpp
@@ -151,21 +151,21 @@ function restore_local_xmpp {
151 151
         rm -rf $temp_restore_dir
152 152
         service prosody restart
153 153
         chown -R prosody:prosody /var/lib/prosody/*
154
-        echo $"Restore of XMPP settings complete"
154
+        echo $"Restore of xmpp settings complete"
155 155
     fi
156 156
 }
157 157
 
158 158
 function backup_remote_xmpp {
159 159
     if [ -d /var/lib/prosody ]; then
160
-        echo $"Backing up the XMPP settings"
160
+        echo $"Backing up the xmpp settings"
161 161
         backup_directory_to_friend /var/lib/prosody xmpp
162
-        echo $"Backup of XMPP settings complete"
162
+        echo $"Backup of xmpp settings complete"
163 163
     fi
164 164
 }
165 165
 
166 166
 function restore_remote_xmpp {
167 167
     if [ -d /var/lib/prosody ]; then
168
-        echo $"Restoring XMPP settings"
168
+        echo $"Restoring xmpp settings"
169 169
         temp_restore_dir=/root/tempxmpp
170 170
         function_check restore_directory_from_friend
171 171
         restore_directory_from_friend $temp_restore_dir xmpp
@@ -176,7 +176,7 @@ function restore_remote_xmpp {
176 176
         rm -rf $temp_restore_dir
177 177
         service prosody restart
178 178
         chown -R prosody:prosody /var/lib/prosody/*
179
-        echo $"Restore of XMPP settings complete"
179
+        echo $"Restore of xmpp settings complete"
180 180
     fi
181 181
 }
182 182
 
@@ -237,7 +237,7 @@ function remove_xmpp {
237 237
     fi
238 238
 
239 239
     sed '/install_xmpp/d' $COMPLETION_FILE
240
-    sed '/XMPP /d' $COMPLETION_FILE
240
+    sed '/xmpp /d' $COMPLETION_FILE
241 241
 }
242 242
 
243 243
 function xmpp_email_headers {
@@ -373,21 +373,21 @@ function install_xmpp_main {
373 373
     touch /home/$MY_USERNAME/README
374 374
 
375 375
     if [ ! -d /var/lib/tor ]; then
376
-        echo $'No Tor installation found. XMPP onion site cannot be configured.'
376
+        echo $'No Tor installation found. xmpp onion site cannot be configured.'
377 377
         exit 877367
378 378
     fi
379 379
     if ! grep -q "hidden_service_xmpp" /etc/tor/torrc; then
380 380
         echo 'HiddenServiceDir /var/lib/tor/hidden_service_xmpp/' >> /etc/tor/torrc
381 381
         echo "HiddenServicePort 5222 127.0.0.1:5222" >> /etc/tor/torrc
382 382
         echo "HiddenServicePort 5269 127.0.0.1:5269" >> /etc/tor/torrc
383
-        echo $'Added onion site for XMPP chat'
383
+        echo $'Added onion site for xmpp chat'
384 384
     fi
385 385
 
386 386
     systemctl restart tor
387 387
     wait_for_onion_service 'xmpp'
388 388
 
389 389
     if [ ! -f /var/lib/tor/hidden_service_xmpp/hostname ]; then
390
-        echo $'XMPP onion site hostname not found'
390
+        echo $'xmpp onion site hostname not found'
391 391
         exit 65349
392 392
     fi
393 393
     XMPP_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_xmpp/hostname)
@@ -402,7 +402,7 @@ function install_xmpp_main {
402 402
         sed -i "s|xmpp onion domain.*|xmpp onion domain:${XMPP_ONION_HOSTNAME}|g" $COMPLETION_FILE
403 403
     fi
404 404
 
405
-    if ! grep -q "Your XMPP password is" /home/$MY_USERNAME/README; then
405
+    if ! grep -q "Your xmpp password is" /home/$MY_USERNAME/README; then
406 406
         if [ ${#XMPP_PASSWORD} -lt 8 ]; then
407 407
             if [ -f $IMAGE_PASSWORD_FILE ]; then
408 408
                 XMPP_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"

+ 1
- 0
src/freedombone-utils-upgrade View File

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