fix npm #1604 [skip ci]
This commit is contained in:
parent
83b9d13ec9
commit
30a3f185ef
20
install.sh
20
install.sh
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_VERSION="75"
|
||||
SCRIPT_VERSION="76"
|
||||
SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/install.sh'
|
||||
|
||||
sudo apt install -y curl wget dirmngr gnupg lsb-release
|
||||
|
@ -336,9 +336,23 @@ MESH_VER=$(grep "^MESH_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
|
|||
sudo mkdir -p /meshcentral/meshcentral-data
|
||||
sudo chown ${USER}:${USER} -R /meshcentral
|
||||
cd /meshcentral
|
||||
npm install meshcentral@${MESH_VER}
|
||||
sudo chown ${USER}:${USER} -R /meshcentral
|
||||
|
||||
mesh_pkg="$(
|
||||
cat <<EOF
|
||||
{
|
||||
"dependencies": {
|
||||
"archiver": "5.3.1",
|
||||
"meshcentral": "${MESH_VER}",
|
||||
"otplib": "10.2.3",
|
||||
"pg": "8.7.1",
|
||||
"pgtools": "0.3.2"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)"
|
||||
echo "${mesh_pkg}" >/meshcentral/package.json
|
||||
|
||||
meshcfg="$(
|
||||
cat <<EOF
|
||||
{
|
||||
|
@ -382,6 +396,8 @@ EOF
|
|||
)"
|
||||
echo "${meshcfg}" >/meshcentral/meshcentral-data/config.json
|
||||
|
||||
npm install
|
||||
|
||||
localvars="$(
|
||||
cat <<EOF
|
||||
SECRET_KEY = "${DJANGO_SEKRET}"
|
||||
|
|
18
restore.sh
18
restore.sh
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_VERSION="50"
|
||||
SCRIPT_VERSION="51"
|
||||
SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/restore.sh'
|
||||
|
||||
sudo apt update
|
||||
|
@ -349,7 +349,21 @@ else
|
|||
fi
|
||||
|
||||
cd /meshcentral
|
||||
npm install meshcentral@${MESH_VER}
|
||||
mesh_pkg="$(
|
||||
cat <<EOF
|
||||
{
|
||||
"dependencies": {
|
||||
"archiver": "5.3.1",
|
||||
"meshcentral": "${MESH_VER}",
|
||||
"otplib": "10.2.3",
|
||||
"pg": "8.7.1",
|
||||
"pgtools": "0.3.2"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)"
|
||||
echo "${mesh_pkg}" >/meshcentral/package.json
|
||||
npm install
|
||||
|
||||
if [ "$FROM_MONGO" = true ]; then
|
||||
node node_modules/meshcentral --dbimport >/dev/null
|
||||
|
|
20
update.sh
20
update.sh
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_VERSION="146"
|
||||
SCRIPT_VERSION="147"
|
||||
SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/update.sh'
|
||||
LATEST_SETTINGS_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/api/tacticalrmm/tacticalrmm/settings.py'
|
||||
YELLOW='\033[1;33m'
|
||||
|
@ -407,8 +407,22 @@ if [[ "${CURRENT_MESH_VER}" != "${LATEST_MESH_VER}" ]] || [[ "$force" = true ]];
|
|||
sudo systemctl stop meshcentral
|
||||
sudo chown ${USER}:${USER} -R /meshcentral
|
||||
cd /meshcentral
|
||||
rm -rf node_modules/
|
||||
npm install meshcentral@${LATEST_MESH_VER}
|
||||
rm -rf node_modules/ package.json package-lock.json
|
||||
mesh_pkg="$(
|
||||
cat <<EOF
|
||||
{
|
||||
"dependencies": {
|
||||
"archiver": "5.3.1",
|
||||
"meshcentral": "${LATEST_MESH_VER}",
|
||||
"otplib": "10.2.3",
|
||||
"pg": "8.7.1",
|
||||
"pgtools": "0.3.2"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)"
|
||||
echo "${mesh_pkg}" >/meshcentral/package.json
|
||||
npm install
|
||||
sudo systemctl start meshcentral
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue