|
@@ -13,7 +13,7 @@
|
13
|
13
|
# License
|
14
|
14
|
# =======
|
15
|
15
|
#
|
16
|
|
-# Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
|
|
16
|
+# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
|
17
|
17
|
#
|
18
|
18
|
# This program is free software: you can redistribute it and/or modify
|
19
|
19
|
# it under the terms of the GNU Affero General Public License as published by
|
|
@@ -360,6 +360,11 @@ function restore_local_etherpad {
|
360
|
360
|
if [ -f /etc/ssl/private/${ETHERPAD_DOMAIN_NAME}.key ]; then
|
361
|
361
|
chown etherpad: /etc/ssl/private/${ETHERPAD_DOMAIN_NAME}.key
|
362
|
362
|
fi
|
|
363
|
+
|
|
364
|
+ MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
|
365
|
+ settings_file=/var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json
|
|
366
|
+ sed -i "s|\"password\":.*|\"password\": \"${MARIADB_PASSWORD}\",|g" $settings_file
|
|
367
|
+ MARIADB_PASSWORD=
|
363
|
368
|
fi
|
364
|
369
|
}
|
365
|
370
|
|
|
@@ -405,6 +410,11 @@ function restore_remote_etherpad {
|
405
|
410
|
if [ -f /etc/ssl/private/${ETHERPAD_DOMAIN_NAME}.key ]; then
|
406
|
411
|
chown etherpad: /etc/ssl/private/${ETHERPAD_DOMAIN_NAME}.key
|
407
|
412
|
fi
|
|
413
|
+
|
|
414
|
+ MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
|
415
|
+ settings_file=/var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json
|
|
416
|
+ sed -i "s|\"password\":.*|\"password\": \"${MARIADB_PASSWORD}\",|g" $settings_file
|
|
417
|
+ MARIADB_PASSWORD=
|
408
|
418
|
fi
|
409
|
419
|
}
|
410
|
420
|
|