fix runtimes issue with starting then stopping, seems forever not needed under docker

This commit is contained in:
Lawrence 2018-01-13 13:41:39 -05:00
parent 501845e412
commit 81b1a3acf4
3 changed files with 5 additions and 4 deletions

View File

@ -15,8 +15,7 @@ RUN adduser --quiet meshcentral \
&& chmod +x /startmeshcentral.sh \ && chmod +x /startmeshcentral.sh \
&& su - meshcentral \ && su - meshcentral \
&& cd /home/meshcentral \ && cd /home/meshcentral \
&& npm install meshcentral node-7z greenlock-cli \ && npm install meshcentral node-7z greenlock-cli
&& ls
ENV PORT 443 ENV PORT 443
ENV REDIRPORT 80 ENV REDIRPORT 80

View File

@ -15,7 +15,7 @@ cd /home/meshcentral/
npm install meshcentral npm install meshcentral
if ! [ -f node_modules/.meshcentral-data/agentserver-cert-private.key ] ;then if ! [ -f node_modules/.meshcentral-data/agentserver-cert-private.key ] ;then
forever start node_modules/meshcentral/meshcentral.js --cert $HOSTNAME node node_modules/meshcentral/meshcentral.js --cert $HOSTNAME --port $PORT --redirport $REDIRPORT
elif [ -f ssl.key ]; then elif [ -f ssl.key ]; then
ln -sf ssl.key node_modules/.meshcentral-data/agentserver-cert-private.key ln -sf ssl.key node_modules/.meshcentral-data/agentserver-cert-private.key
ln -sf ssl.cert node_modules/.meshcentral-data/agentserver-cert-public.crt ln -sf ssl.cert node_modules/.meshcentral-data/agentserver-cert-public.crt
@ -25,7 +25,8 @@ elif [ -f ssl.key ]; then
ln -sf ssl.cert node_modules/.meshcentral-data/webserver-cert-public.crt ln -sf ssl.cert node_modules/.meshcentral-data/webserver-cert-public.crt
ln -sf ssl.key node_modules/.meshcentral-data/mpsserver-cert-private.key ln -sf ssl.key node_modules/.meshcentral-data/mpsserver-cert-private.key
ln -sf ssl.cert node_modules/.meshcentral-data/mpsserver-cert-public.crt ln -sf ssl.cert node_modules/.meshcentral-data/mpsserver-cert-public.crt
node node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT
else else
forever start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT node node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT
fi fi

View File

@ -11,6 +11,7 @@ else
REDIRPORT=$2 REDIRPORT=$2
fi fi
su - meshcentral su - meshcentral
cd /home/meshcentral/ cd /home/meshcentral/
npm install meshcentral npm install meshcentral