Browse Source

Install any missing node packages

Bob Mottram 7 years ago
parent
commit
d02236c1eb
1 changed files with 34 additions and 0 deletions
  1. 34
    0
      src/freedombone-app-ghost

+ 34
- 0
src/freedombone-app-ghost View File

@@ -239,6 +239,23 @@ function restore_local_ghost {
239 239
         sed -i "s|password :.*|password : '${MARIADB_PASSWORD}',|g" $ghost_config
240 240
         MARIADB_PASSWORD=
241 241
 
242
+        # install any missing packages
243
+        if [ ! -d /var/www/${GHOST_DOMAIN_NAME}/htdocs/node_modules/intl ]; then
244
+            cd /var/www/${GHOST_DOMAIN_NAME}/htdocs
245
+            npm install passport-http-bearer@1.0.1
246
+            npm install amperize@0.3.4
247
+            npm install bcryptjs@2.4.3
248
+            npm install knex@0.12.9
249
+            npm install bookshelf@0.10.2
250
+            npm install cookie-session@1.2.0
251
+            npm install ghost-gql@0.0.6
252
+            npm install intl@1.2.5
253
+            npm install sanitize-html@1.14.1
254
+            npm install showdown-ghost@0.3.6
255
+            npm install superagent@3.5.2
256
+            npm install mysql@2.1.1
257
+        fi
258
+
242 259
         systemctl start ghost
243 260
         restart_site
244 261
     fi
@@ -285,6 +302,23 @@ function restore_remote_ghost {
285 302
     sed -i "s|password :.*|password : '${MARIADB_PASSWORD}',|g" $ghost_config
286 303
     MARIADB_PASSWORD=
287 304
 
305
+    # install any missing packages
306
+    if [ ! -d /var/www/${GHOST_DOMAIN_NAME}/htdocs/node_modules/intl ]; then
307
+        cd /var/www/${GHOST_DOMAIN_NAME}/htdocs
308
+        npm install passport-http-bearer@1.0.1
309
+        npm install amperize@0.3.4
310
+        npm install bcryptjs@2.4.3
311
+        npm install knex@0.12.9
312
+        npm install bookshelf@0.10.2
313
+        npm install cookie-session@1.2.0
314
+        npm install ghost-gql@0.0.6
315
+        npm install intl@1.2.5
316
+        npm install sanitize-html@1.14.1
317
+        npm install showdown-ghost@0.3.6
318
+        npm install superagent@3.5.2
319
+        npm install mysql@2.1.1
320
+    fi
321
+
288 322
     systemctl start ghost
289 323
     restart_site
290 324
     chown -R ghost: /var/www/$GHOST_DOMAIN_NAME/htdocs/