diff --git a/install.sh b/install.sh index 7cf88e6e..479dd178 100644 --- a/install.sh +++ b/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 </meshcentral/package.json + meshcfg="$( cat </meshcentral/meshcentral-data/config.json +npm install + localvars="$( cat </meshcentral/package.json +npm install if [ "$FROM_MONGO" = true ]; then node node_modules/meshcentral --dbimport >/dev/null diff --git a/update.sh b/update.sh index bc9408a1..0522d5da 100644 --- a/update.sh +++ b/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 </meshcentral/package.json + npm install sudo systemctl start meshcentral fi