From d02236c1ebe5460049169fdd6900a7e46af2e643 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 1 Jul 2017 15:23:23 +0100 Subject: [PATCH] Install any missing node packages --- src/freedombone-app-ghost | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/freedombone-app-ghost b/src/freedombone-app-ghost index d78310f8..59c2e8e4 100755 --- a/src/freedombone-app-ghost +++ b/src/freedombone-app-ghost @@ -239,6 +239,23 @@ function restore_local_ghost { sed -i "s|password :.*|password : '${MARIADB_PASSWORD}',|g" $ghost_config MARIADB_PASSWORD= + # install any missing packages + if [ ! -d /var/www/${GHOST_DOMAIN_NAME}/htdocs/node_modules/intl ]; then + cd /var/www/${GHOST_DOMAIN_NAME}/htdocs + npm install passport-http-bearer@1.0.1 + npm install amperize@0.3.4 + npm install bcryptjs@2.4.3 + npm install knex@0.12.9 + npm install bookshelf@0.10.2 + npm install cookie-session@1.2.0 + npm install ghost-gql@0.0.6 + npm install intl@1.2.5 + npm install sanitize-html@1.14.1 + npm install showdown-ghost@0.3.6 + npm install superagent@3.5.2 + npm install mysql@2.1.1 + fi + systemctl start ghost restart_site fi @@ -285,6 +302,23 @@ function restore_remote_ghost { sed -i "s|password :.*|password : '${MARIADB_PASSWORD}',|g" $ghost_config MARIADB_PASSWORD= + # install any missing packages + if [ ! -d /var/www/${GHOST_DOMAIN_NAME}/htdocs/node_modules/intl ]; then + cd /var/www/${GHOST_DOMAIN_NAME}/htdocs + npm install passport-http-bearer@1.0.1 + npm install amperize@0.3.4 + npm install bcryptjs@2.4.3 + npm install knex@0.12.9 + npm install bookshelf@0.10.2 + npm install cookie-session@1.2.0 + npm install ghost-gql@0.0.6 + npm install intl@1.2.5 + npm install sanitize-html@1.14.1 + npm install showdown-ghost@0.3.6 + npm install superagent@3.5.2 + npm install mysql@2.1.1 + fi + systemctl start ghost restart_site chown -R ghost: /var/www/$GHOST_DOMAIN_NAME/htdocs/