瀏覽代碼

Check that ghost cli gets installed

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

+ 6
- 0
src/freedombone-app-ghost 查看文件

@@ -319,6 +319,8 @@ function remove_ghost {
319 319
     rm /etc/systemd/system/ghost.service
320 320
     systemctl daemon-reload
321 321
 
322
+    npm uninstall -g ghost-cli
323
+
322 324
     function_check remove_nodejs
323 325
     remove_nodejs ghost
324 326
 
@@ -371,6 +373,10 @@ function install_ghost {
371 373
 
372 374
     # now install ghost itself
373 375
     npm install -g ghost-cli@1.4.1
376
+    if [ ! -f /usr/local/bin/ghost ]; then
377
+        echo $'ghost was not installed'
378
+        exit 738539
379
+    fi
374 380
 
375 381
     GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
376 382