Pārlūkot izejas kodu

Use consistent xmpp name

Bob Mottram 8 gadus atpakaļ
vecāks
revīzija
56954a59bb
3 mainītis faili ar 15 papildinājumiem un 14 dzēšanām
  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 Parādīt failu

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

+ 11
- 11
src/freedombone-app-xmpp Parādīt failu

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

+ 1
- 0
src/freedombone-utils-upgrade Parādīt failu

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