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
a5ce92205b
commit
80b03e27fb
@ -11,13 +11,25 @@ else
|
|||||||
RPORT=$2
|
RPORT=$2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ~
|
|
||||||
npmbin=$(which node)
|
if [ $1 != "" ] ; then
|
||||||
$npmbin install meshcentral
|
PORT=$1
|
||||||
foreverbin=$(which forever)
|
fi
|
||||||
$foreverbin start node_modules/meshcentral/meshcentral.js --cert $HOSTNAME
|
|
||||||
sleep 10
|
if [ $2 != "" ]; then
|
||||||
$foreverbin stop node_modules/meshcentral/meshcentral.js
|
REDIRPORT=$2
|
||||||
|
fi
|
||||||
|
|
||||||
|
su - meshcentral
|
||||||
|
cd /home/meshcentral/
|
||||||
|
npm install meshcentral
|
||||||
|
|
||||||
|
if ! [ -f node_modules/.meshcentral-data/agentserver-cert-private.key ] ;then
|
||||||
|
forever start node_modules/meshcentral/meshcentral.js --cert $HOSTNAME
|
||||||
|
sleep 10
|
||||||
|
forever stop node_modules/meshcentral/meshcentral.js
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f ssl.key ]; then
|
if [ -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
|
||||||
@ -28,5 +40,6 @@ if [ -f ssl.key ]; then
|
|||||||
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
|
||||||
fi
|
fi
|
||||||
$foreverbin start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $RPORT
|
|
||||||
|
forever start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user