|
@@ -76,10 +76,38 @@ function backup_local_hubzilla {
|
76
|
76
|
fi
|
77
|
77
|
}
|
78
|
78
|
|
|
79
|
+function restore_local_hubzilla {
|
|
80
|
+ if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
|
|
81
|
+ return
|
|
82
|
+ fi
|
|
83
|
+ HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
|
|
84
|
+ if [ $HUBZILLA_DOMAIN_NAME ]; then
|
|
85
|
+ echo $"Restoring Hubzilla"
|
|
86
|
+ temp_restore_dir=/root/temphubzilla
|
|
87
|
+ hubzilla_dir=/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs
|
|
88
|
+ restore_database hubzilla ${HUBZILLA_DOMAIN_NAME}
|
|
89
|
+ if [ -d $USB_MOUNT/backup/hubzilla ]; then
|
|
90
|
+ if [ ! -d $hubzilla_dir/store/[data]/smarty3 ]; then
|
|
91
|
+ mkdir -p $hubzilla_dir/store/[data]/smarty3
|
|
92
|
+ fi
|
|
93
|
+ chmod 777 $hubzilla_dir/store/[data]/smarty3
|
|
94
|
+ chown -R www-data:www-data $hubzilla_dir/*
|
|
95
|
+ if [ -d $temp_restore_dir ]; then
|
|
96
|
+ rm -rf $temp_restore_dir
|
|
97
|
+ fi
|
|
98
|
+ fi
|
|
99
|
+ echo $"Restore of Hubzilla complete"
|
|
100
|
+ fi
|
|
101
|
+}
|
|
102
|
+
|
79
|
103
|
function backup_remote_hubzilla {
|
80
|
104
|
echo -n ''
|
81
|
105
|
}
|
82
|
106
|
|
|
107
|
+function restore_remote_hubzilla {
|
|
108
|
+ echo -n ''
|
|
109
|
+}
|
|
110
|
+
|
83
|
111
|
function remove_hubzilla {
|
84
|
112
|
if ! grep -Fxq "install_hubzilla" $COMPLETION_FILE; then
|
85
|
113
|
return
|