瀏覽代碼

ghost restore

Bob Mottram 8 年之前
父節點
當前提交
59c985fde4
共有 1 個檔案被更改,包括 4 行新增7 行删除
  1. 4
    7
      src/freedombone-app-ghost

+ 4
- 7
src/freedombone-app-ghost 查看文件

@@ -223,10 +223,6 @@ function restore_local_ghost {
223 223
         GHOST_DOMAIN_NAME=$(get_completion_param "ghost domain")
224 224
     fi
225 225
     if [ $GHOST_DOMAIN_NAME ]; then
226
-        function_check get_mariadb_password
227
-        get_mariadb_password
228
-        DATABASE_PASSWORD=$MARIADB_PASSWORD
229
-
230 226
         systemctl stop ghost
231 227
 
232 228
         function_check ghost_create_database
@@ -236,9 +232,7 @@ function restore_local_ghost {
236 232
         restore_database ghost ${GHOST_DOMAIN_NAME}
237 233
 
238 234
         systemctl start ghost
239
-
240
-        DATABASE_PASSWORD=
241
-        MARIADB_PASSWORD=
235
+        restart_site
242 236
     fi
243 237
 }
244 238
 
@@ -266,6 +260,8 @@ function restore_remote_ghost {
266 260
         GHOST_DOMAIN_NAME=$(get_completion_param "ghost domain")
267 261
     fi
268 262
 
263
+    systemctl stop ghost
264
+
269 265
     function_check get_mariadb_password
270 266
     get_mariadb_password
271 267
 
@@ -275,6 +271,7 @@ function restore_remote_ghost {
275 271
     ghost_create_database
276 272
 
277 273
     restore_database_from_friend ghost ${GHOST_DOMAIN_NAME}
274
+    systemctl start ghost
278 275
     restart_site
279 276
     chown -R ghost: /var/www/$GHOST_DOMAIN_NAME/htdocs/
280 277
 }