diff --git a/install.sh b/install.sh index 4cd6d1e1..e1b84cd2 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION="60" +SCRIPT_VERSION="61" SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/install.sh' sudo apt install -y curl wget dirmngr gnupg lsb-release @@ -658,7 +658,7 @@ CELERY_APP="tacticalrmm" CELERYD_MULTI="multi" -CELERYD_OPTS="--time-limit=86400 --autoscale=50,3" +CELERYD_OPTS="--time-limit=86400 --autoscale=20,2" CELERYD_PID_FILE="/rmm/api/tacticalrmm/%n.pid" CELERYD_LOG_FILE="/var/log/celery/%n%I.log" diff --git a/update.sh b/update.sh index 42629b9a..7c8f6b0a 100644 --- a/update.sh +++ b/update.sh @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION="132" +SCRIPT_VERSION="133" 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' @@ -258,6 +258,11 @@ sudo chown ${USER}:${USER} -R /etc/conf.d/ sudo chown ${USER}:${USER} -R /etc/letsencrypt sudo chmod 775 -R /etc/letsencrypt +CHECK_CELERY_CONFIG=$(grep "autoscale=20,2" /etc/conf.d/celery.conf) +if ! [[ $CHECK_CELERY_CONFIG ]]; then + sed -i 's/CELERYD_OPTS=.*/CELERYD_OPTS="--time-limit=86400 --autoscale=20,2"/g' /etc/conf.d/celery.conf +fi + CHECK_ADMIN_ENABLED=$(grep ADMIN_ENABLED /rmm/api/tacticalrmm/tacticalrmm/local_settings.py) if ! [[ $CHECK_ADMIN_ENABLED ]]; then adminenabled="$(cat << EOF