From a5ce92205b81d27f81351724e982462597404995 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Sat, 13 Jan 2018 12:42:46 -0500 Subject: [PATCH] fix runtime issues --- docker/Dockerfile | 5 +++-- docker/startmeshcentral.sh | 10 ++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b0ee0fa4..fd6efd76 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,7 +3,7 @@ MAINTAINER Lawrence Stubbs COPY startmeshcentral.sh / RUN apt-get update \ - && apt-get install -y p7zip-full which \ + && apt-get install -y p7zip-full \ && wget -q http://www.7-zip.org/a/lzma1604.7z \ && 7z x lzma1604.7z -olzma1604 \ && cp lzma1604/bin/*.sfx /usr/lib/p7zip/ \ @@ -15,7 +15,8 @@ RUN adduser --quiet meshcentral \ && chmod +x /startmeshcentral.sh \ && su - meshcentral \ && cd /home/meshcentral \ - && npm install meshcentral node-7z greenlock-cli + && npm install meshcentral node-7z greenlock-cli \ + && ls ENV PORT 443 ENV REDIRPORT 80 diff --git a/docker/startmeshcentral.sh b/docker/startmeshcentral.sh index 1ec1bd56..93377930 100644 --- a/docker/startmeshcentral.sh +++ b/docker/startmeshcentral.sh @@ -12,14 +12,12 @@ fi su - meshcentral cd /home/meshcentral/ -npmbin=$(which node) -foreverbin=$(which forever) -$npmbin install meshcentral +npm install meshcentral if ! [ -f node_modules/.meshcentral-data/agentserver-cert-private.key ] ;then - $foreverbin start node_modules/meshcentral/meshcentral.js --cert $HOSTNAME + forever start node_modules/meshcentral/meshcentral.js --cert $HOSTNAME sleep 10 - $foreverbin stop node_modules/meshcentral/meshcentral.js + forever stop node_modules/meshcentral/meshcentral.js fi if [ -f ssl.key ]; then @@ -33,5 +31,5 @@ if [ -f ssl.key ]; then ln -sf ssl.cert node_modules/.meshcentral-data/mpsserver-cert-public.crt fi -$foreverbin start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT +forever start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT \ No newline at end of file