|
@@ -1113,26 +1113,6 @@ function restore_blog {
|
1113
|
1113
|
fi
|
1114
|
1114
|
}
|
1115
|
1115
|
|
1116
|
|
-function restore_cjdns {
|
1117
|
|
- if [[ $RESTORE_APP != 'all' ]]; then
|
1118
|
|
- if [[ $RESTORE_APP != 'cjdns' ]]; then
|
1119
|
|
- return
|
1120
|
|
- fi
|
1121
|
|
- fi
|
1122
|
|
- if [ -d $USB_MOUNT/backup/cjdns ]; then
|
1123
|
|
- echo $"Restoring cjdns installation"
|
1124
|
|
- restore_directory_from_usb /root/tempcjdns cjdns
|
1125
|
|
- rm -rf /etc/cjdns
|
1126
|
|
- cp -r /root/tempcjdns/etc/cjdns /etc/
|
1127
|
|
- if [ ! "$?" = "0" ]; then
|
1128
|
|
- set_user_permissions
|
1129
|
|
- backup_unmount_drive
|
1130
|
|
- exit 8472
|
1131
|
|
- fi
|
1132
|
|
- rm -rf /root/tempcjdns
|
1133
|
|
- fi
|
1134
|
|
-}
|
1135
|
|
-
|
1136
|
1116
|
function restore_email {
|
1137
|
1117
|
if [[ $RESTORE_APP != 'all' ]]; then
|
1138
|
1118
|
if [[ $RESTORE_APP != 'email' ]]; then
|
|
@@ -1163,28 +1143,6 @@ function restore_email {
|
1163
|
1143
|
fi
|
1164
|
1144
|
}
|
1165
|
1145
|
|
1166
|
|
-function restore_dlna {
|
1167
|
|
- if [[ $RESTORE_APP != 'all' ]]; then
|
1168
|
|
- if [[ $RESTORE_APP != 'dlna' ]]; then
|
1169
|
|
- return
|
1170
|
|
- fi
|
1171
|
|
- fi
|
1172
|
|
- if [ -d /var/cache/minidlna ]; then
|
1173
|
|
- if [ -d $USB_MOUNT/backup/dlna ]; then
|
1174
|
|
- echo $"Restoring DLNA cache"
|
1175
|
|
- restore_directory_from_usb /root/tempdlna dlna
|
1176
|
|
- cp -r /root/tempdlna/var/cache/minidlna/* /var/cache/minidlna/
|
1177
|
|
- if [ ! "$?" = "0" ]; then
|
1178
|
|
- rm -rf /root/tempdlna
|
1179
|
|
- set_user_permissions
|
1180
|
|
- backup_unmount_drive
|
1181
|
|
- exit 982
|
1182
|
|
- fi
|
1183
|
|
- rm -rf /root/tempdlna
|
1184
|
|
- fi
|
1185
|
|
- fi
|
1186
|
|
-}
|
1187
|
|
-
|
1188
|
1146
|
function get_restore_app {
|
1189
|
1147
|
if [ ${1} ]; then
|
1190
|
1148
|
if [ ! -d /home/${1} ]; then
|
|
@@ -1252,10 +1210,8 @@ restore_mediagoblin
|
1252
|
1210
|
restore_gogs
|
1253
|
1211
|
restore_wiki
|
1254
|
1212
|
restore_blog
|
1255
|
|
-restore_cjdns
|
1256
|
|
-restore_email
|
1257
|
|
-restore_dlna
|
1258
|
1213
|
|
|
1214
|
+restore_email
|
1259
|
1215
|
restore_apps
|
1260
|
1216
|
set_user_permissions
|
1261
|
1217
|
backup_unmount_drive
|