don't run meshcentral as root
This commit is contained in:
parent
80bfa093a9
commit
64ad539c76
|
@ -79,8 +79,9 @@ sudo systemctl restart mongod
|
||||||
print_green 'Installing MeshCentral'
|
print_green 'Installing MeshCentral'
|
||||||
|
|
||||||
sudo mkdir -p /meshcentral/meshcentral-data
|
sudo mkdir -p /meshcentral/meshcentral-data
|
||||||
|
sudo chown ${USER}:${USER} -R /meshcentral
|
||||||
cd /meshcentral
|
cd /meshcentral
|
||||||
sudo npm install meshcentral
|
npm install meshcentral
|
||||||
cd /home/${USER}
|
cd /home/${USER}
|
||||||
sudo chown ${USER}:${USER} -R /meshcentral
|
sudo chown ${USER}:${USER} -R /meshcentral
|
||||||
|
|
||||||
|
@ -531,11 +532,11 @@ After=nginx.service
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
LimitNOFILE=1000000
|
LimitNOFILE=1000000
|
||||||
ExecStart=/usr/bin/node /meshcentral/node_modules/meshcentral
|
ExecStart=/usr/bin/node node_modules/meshcentral
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
WorkingDirectory=/meshcentral
|
WorkingDirectory=/meshcentral
|
||||||
User=root
|
User=${USER}
|
||||||
Group=root
|
Group=${USER}
|
||||||
Restart=always
|
Restart=always
|
||||||
# Restart service after 10 seconds if node service crashes
|
# Restart service after 10 seconds if node service crashes
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
Loading…
Reference in New Issue