|
@@ -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`)"
|