Parcourir la source

Check that ghost cli gets installed

Bob Mottram il y a 7 ans
Parent
révision
c1ed8a4747
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6
    0
      src/freedombone-app-ghost

+ 6
- 0
src/freedombone-app-ghost Voir le fichier

@@ -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