Browse Source

restore plugins after an update/restore

Girish Ramakrishnan 8 years ago
parent
commit
ec0fc50993
1 changed files with 7 additions and 0 deletions
  1. 7 0
      start.sh

+ 7 - 0
start.sh

@@ -62,6 +62,13 @@ sed -e "s,##APP_ORIGIN,${APP_ORIGIN}," \
     -e "s/##SECRET/$(uuid)/" \
     /app/code/config.json.template > /run/nodebb/config.json
 
+for plugin in $(./nodebb plugins | grep 'nodebb-' | cut -f3 -d' '); do
+    if [[ ! -d "/app/code/node_modules/${plugin}" ]]; then
+        echo "Could not find plugin ${plugin}. Installing it"
+        cd /app/code && npm install "${plugin}"
+    fi
+done
+
 echo "Updating nodebb"
 node /app/code/app --upgrade