mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-31 00:15:57 -05:00
e29ac0e29d
taking the initial 5 step or more process to take over remote computer to one. a temporary fix to get more in line with other remote support like software. added some scripts linux & windows to quickly setup the whole system on your server.
32 lines
1.1 KiB
Bash
32 lines
1.1 KiB
Bash
#!/bin/sh
|
|
if [ $1 == "" ] ; then
|
|
PORT=444
|
|
else
|
|
PORT=$1
|
|
fi
|
|
|
|
if [ $2 == "" ]; then
|
|
RPORT=81
|
|
else
|
|
RPORT=$2
|
|
fi
|
|
|
|
cd ~
|
|
npmbin=$(which node)
|
|
$npmbin install meshcentral
|
|
foreverbin=$(which forever)
|
|
$foreverbin start node_modules/meshcentral/meshcentral.js --cert $HOSTNAME
|
|
sleep 10
|
|
$foreverbin stop node_modules/meshcentral/meshcentral.js
|
|
if [ -f ssl.key ]; then
|
|
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.key node_modules/.meshcentral-data/root-cert-private.key
|
|
ln -sf ssl.cert node_modules/.meshcentral-data/root-cert-public.crt
|
|
ln -sf ssl.key node_modules/.meshcentral-data/webserver-cert-private.key
|
|
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.cert node_modules/.meshcentral-data/mpsserver-cert-public.crt
|
|
fi
|
|
$foreverbin start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $RPORT
|
|
|