mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-30 16:05:58 -05:00
fix runtime issues
This commit is contained in:
parent
4e70982c01
commit
a5ce92205b
@ -3,7 +3,7 @@ MAINTAINER Lawrence Stubbs <technoexpressnet@gmail.com>
|
|||||||
|
|
||||||
COPY startmeshcentral.sh /
|
COPY startmeshcentral.sh /
|
||||||
RUN apt-get update \
|
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 \
|
&& wget -q http://www.7-zip.org/a/lzma1604.7z \
|
||||||
&& 7z x lzma1604.7z -olzma1604 \
|
&& 7z x lzma1604.7z -olzma1604 \
|
||||||
&& cp lzma1604/bin/*.sfx /usr/lib/p7zip/ \
|
&& cp lzma1604/bin/*.sfx /usr/lib/p7zip/ \
|
||||||
@ -15,7 +15,8 @@ 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
|
||||||
|
@ -12,14 +12,12 @@ fi
|
|||||||
|
|
||||||
su - meshcentral
|
su - meshcentral
|
||||||
cd /home/meshcentral/
|
cd /home/meshcentral/
|
||||||
npmbin=$(which node)
|
npm install meshcentral
|
||||||
foreverbin=$(which forever)
|
|
||||||
$npmbin install meshcentral
|
|
||||||
|
|
||||||
if ! [ -f node_modules/.meshcentral-data/agentserver-cert-private.key ] ;then
|
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
|
sleep 10
|
||||||
$foreverbin stop node_modules/meshcentral/meshcentral.js
|
forever stop node_modules/meshcentral/meshcentral.js
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f ssl.key ]; then
|
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
|
ln -sf ssl.cert node_modules/.meshcentral-data/mpsserver-cert-public.crt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$foreverbin start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT
|
forever start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user