Browse Source

Fix Meshcentral

master
Tai Dao 4 years ago
parent
commit
0d7c554e89
  1. 3
      meshcentral/config.json.template
  2. 3
      meshcentral/docker-compose.yml
  3. 7
      meshcentral/startup.sh

3
meshcentral/config.json.template

@ -13,12 +13,11 @@ @@ -13,12 +13,11 @@
"TLSOffload": true,
"SelfUpdate": false,
"AllowFraming": false,
"WebRTC": false
"WebRTC": true
},
"domains": {
"": {
"title": "MeshCentral",
"_NewAccounts": false,
"certUrl": "my.reverse.proxy"
}
}

3
meshcentral/docker-compose.yml

@ -11,9 +11,6 @@ services: @@ -11,9 +11,6 @@ services:
- CONTAINER_PORT=4430
- REVERSE_PROXY=YOURDOMAIN.com
- REVERSE_PROXY_TLS_PORT=443
- IFRAME=false
- ALLOW_NEW_ACCOUNTS=true
- WEBRTC=true
volumes:
- ./data:/opt/meshcentral/meshcentral-data #config.json and other important files live here. A must for data persistence
- ./user_files:/opt/meshcentral/meshcentral-files #where file uploads for users live

7
meshcentral/startup.sh

@ -6,9 +6,7 @@ export HOSTNAME @@ -6,9 +6,7 @@ export HOSTNAME
export CONTAINER_PORT
export REVERSE_PROXY
export REVERSE_PROXY_TLS_PORT
export IFRAME
export ALLOW_NEW_ACCOUNTS
export WEBRTC
if [ -f "meshcentral-data/config.json" ]
then
@ -17,9 +15,6 @@ if [ -f "meshcentral-data/config.json" ] @@ -17,9 +15,6 @@ if [ -f "meshcentral-data/config.json" ]
cp config.json.template meshcentral-data/config.json
sed -i "s_\"port\": 4430_\"port\": $CONTAINER_PORT_" meshcentral-data/config.json
sed -i "s/\"cert\": \"myserver.mydomain.com\"/\"cert\": \"$HOSTNAME\"/" meshcentral-data/config.json
sed -i "s/\"NewAccounts\": true/\"NewAccounts\": \"$ALLOW_NEW_ACCOUNTS\"/" meshcentral-data/config.json
sed -i "s/\"WebRTC\": false/\"WebRTC\": \"$WEBRTC\"/" meshcentral-data/config.json
sed -i "s/\"AllowFraming\": false/\"AllowFraming\": \"$IFRAME\"/" meshcentral-data/config.json
if [ "$REVERSE_PROXY" != "false" ]
then
sed -i "s/\"_certUrl\": \"my\.reverse\.proxy\"/\"certUrl\": \"https:\/\/$REVERSE_PROXY:$REVERSE_PROXY_TLS_PORT\"/" meshcentral-data/config.json

Loading…
Cancel
Save