|
@@ -123,11 +123,17 @@ function restore_local_cryptpad {
|
123
|
123
|
function_check restore_directory_from_usb
|
124
|
124
|
restore_directory_from_usb $temp_restore_dir cryptpad
|
125
|
125
|
if [ ! -d $temp_restore_dir$CRYPTPAD_DIR/datastore ]; then
|
126
|
|
- systemctl start cryptpad
|
127
|
|
- echo 'Failed to restore cryptpad'
|
128
|
|
- rm -rf $temp_restore_dir
|
|
126
|
+ if [ -d $temp_restore_dir$CRYPTPAD_DIR ]; then
|
|
127
|
+ cp -r $temp_restore_dir$CRYPTPAD_DIR/* $CRYPTPAD_DIR/datastore/
|
|
128
|
+ else
|
|
129
|
+ systemctl start cryptpad
|
|
130
|
+ echo 'Failed to restore cryptpad'
|
|
131
|
+ rm -rf $temp_restore_dir
|
|
132
|
+ exit 8736529
|
|
133
|
+ fi
|
|
134
|
+ else
|
|
135
|
+ cp -r $temp_restore_dir$CRYPTPAD_DIR/datastore/* $CRYPTPAD_DIR/datastore/
|
129
|
136
|
fi
|
130
|
|
- cp -r $temp_restore_dir$CRYPTPAD_DIR/datastore/* $CRYPTPAD_DIR/datastore/
|
131
|
137
|
rm -rf $temp_restore_dir
|
132
|
138
|
systemctl start cryptpad
|
133
|
139
|
fi
|