From 4e97c0c5c9b588fa884b9cc492d63bdd66900fa4 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:27:30 +0000 Subject: [PATCH 01/11] add note about where to find bulk output results --- api/tacticalrmm/agents/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/tacticalrmm/agents/views.py b/api/tacticalrmm/agents/views.py index e1cf38af9f..f3a2808da2 100644 --- a/api/tacticalrmm/agents/views.py +++ b/api/tacticalrmm/agents/views.py @@ -987,6 +987,8 @@ def bulk(request): debug_info={"ip": request._client_ip}, ) + ht = "Check the History tab on the agent to view the results." + if request.data["mode"] == "command": if request.data["shell"] == "custom" and request.data["custom_shell"]: shell = request.data["custom_shell"] @@ -1001,7 +1003,7 @@ def bulk(request): username=request.user.username[:50], run_as_user=request.data["run_as_user"], ) - return Response(f"Command will now be run on {len(agents)} agents") + return Response(f"Command will now be run on {len(agents)} agents. {ht}") elif request.data["mode"] == "script": script = get_object_or_404(Script, pk=request.data["script"]) @@ -1016,7 +1018,7 @@ def bulk(request): env_vars=request.data["env_vars"], ) - return Response(f"{script.name} will now be run on {len(agents)} agents") + return Response(f"{script.name} will now be run on {len(agents)} agents. {ht}") elif request.data["mode"] == "patch": if request.data["patchMode"] == "install": From e1643aca80a6783b3521b0353f2852869e6c9f79 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:35:48 +0000 Subject: [PATCH 02/11] revert DRF for now until we do more testing --- api/tacticalrmm/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tacticalrmm/requirements.txt b/api/tacticalrmm/requirements.txt index 3e1f35f67c..85f2d698b8 100644 --- a/api/tacticalrmm/requirements.txt +++ b/api/tacticalrmm/requirements.txt @@ -10,7 +10,7 @@ Django==4.2.11 django-cors-headers==4.3.1 django-filter==24.2 django-rest-knox==4.2.0 -djangorestframework==3.15.1 +djangorestframework==3.14.0 drf-spectacular==0.27.1 hiredis==2.3.2 meshctrl==0.1.15 From 376b421eb99d41374b0e0567eec0143874e11099 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:54:42 +0000 Subject: [PATCH 03/11] bump versions --- api/tacticalrmm/tacticalrmm/settings.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index ed9ee8242c..87447b2f4b 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -21,14 +21,14 @@ AUTH_USER_MODEL = "accounts.User" # latest release -TRMM_VERSION = "0.18.2-dev" +TRMM_VERSION = "0.18.2" # https://github.com/amidaware/tacticalrmm-web -WEB_VERSION = "0.101.43" +WEB_VERSION = "0.101.44" # bump this version everytime vue code is changed # to alert user they need to manually refresh their browser -APP_VER = "0.0.191" +APP_VER = "0.0.192" # https://github.com/amidaware/rmmagent LATEST_AGENT_VER = "2.7.0" @@ -43,7 +43,7 @@ # GitHub version to download. The file will be downloaded from GitHub, extracted and installed. # Version to download. If INSTALL_NUSHELL_URL is not provided, the file will be downloaded from GitHub, # extracted and installed. -INSTALL_NUSHELL_VERSION = "0.91.0" +INSTALL_NUSHELL_VERSION = "0.92.1" # URL to download directly. This is expected to be the direct URL, unauthenticated, uncompressed, ready to be installed. # Use {OS}, {ARCH} and {VERSION} to specify the GOOS, GOARCH and INSTALL_NUSHELL_VERSION respectively. # Windows: The ".exe" extension will be added automatically. @@ -64,7 +64,7 @@ INSTALL_DENO = True # Version to download. If INSTALL_DENO_URL is not provided, the file will be downloaded from GitHub, # extracted and installed. -INSTALL_DENO_VERSION = "v1.41.3" +INSTALL_DENO_VERSION = "v1.42.1" # URL to download directly. This is expected to be the direct URL, unauthenticated, uncompressed, ready to be installed. # Use {OS}, {ARCH} and {VERSION} to specify the GOOS, GOARCH and INSTALL_DENO_VERSION respectively. # Windows: The ".exe" extension will be added automatically. From 620dadafe4fa874bf99d4217448eaa58088045c3 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Tue, 9 Apr 2024 03:14:10 +0000 Subject: [PATCH 04/11] back to dev [skip ci] --- api/tacticalrmm/tacticalrmm/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index 87447b2f4b..7bd47cd21e 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -21,7 +21,7 @@ AUTH_USER_MODEL = "accounts.User" # latest release -TRMM_VERSION = "0.18.2" +TRMM_VERSION = "0.18.3-dev" # https://github.com/amidaware/tacticalrmm-web WEB_VERSION = "0.101.44" From eb80e32812c910177b8a7e509f7b417e85d8f6d0 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Fri, 19 Apr 2024 20:36:11 +0000 Subject: [PATCH 05/11] no-owner for pg_dump --- backup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index dc27cfad7b..6f6a6f56ea 100755 --- a/backup.sh +++ b/backup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_VERSION="31" +SCRIPT_VERSION="32" GREEN='\033[0;32m' YELLOW='\033[1;33m' @@ -73,7 +73,7 @@ mkdir ${tmp_dir}/opt POSTGRES_USER=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbuser) POSTGRES_PW=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbpw) -pg_dump --dbname=postgresql://"${POSTGRES_USER}":"${POSTGRES_PW}"@localhost:5432/tacticalrmm | gzip -9 >${tmp_dir}/postgres/db-${dt_now}.psql.gz +pg_dump --no-privileges --no-owner --dbname=postgresql://"${POSTGRES_USER}":"${POSTGRES_PW}"@localhost:5432/tacticalrmm | gzip -9 >${tmp_dir}/postgres/db-${dt_now}.psql.gz node /meshcentral/node_modules/meshcentral --dbexport # for import to postgres @@ -83,7 +83,7 @@ if grep -q postgres "/meshcentral/meshcentral-data/config.json"; then fi MESH_POSTGRES_USER=$(jq '.settings.postgres.user' /meshcentral/meshcentral-data/config.json -r) MESH_POSTGRES_PW=$(jq '.settings.postgres.password' /meshcentral/meshcentral-data/config.json -r) - pg_dump --dbname=postgresql://"${MESH_POSTGRES_USER}":"${MESH_POSTGRES_PW}"@localhost:5432/meshcentral | gzip -9 >${tmp_dir}/postgres/mesh-db-${dt_now}.psql.gz + pg_dump --no-privileges --no-owner --dbname=postgresql://"${MESH_POSTGRES_USER}":"${MESH_POSTGRES_PW}"@localhost:5432/meshcentral | gzip -9 >${tmp_dir}/postgres/mesh-db-${dt_now}.psql.gz else mongodump --gzip --out=${tmp_dir}/meshcentral/mongo fi From 5ef6a0f4ea35575d7a34e37efaeeb340e15889c9 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Fri, 19 Apr 2024 21:21:13 +0000 Subject: [PATCH 06/11] update reqs --- api/tacticalrmm/requirements.txt | 21 +++++++++++---------- api/tacticalrmm/tacticalrmm/settings.py | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/api/tacticalrmm/requirements.txt b/api/tacticalrmm/requirements.txt index 85f2d698b8..38892bbd57 100644 --- a/api/tacticalrmm/requirements.txt +++ b/api/tacticalrmm/requirements.txt @@ -1,18 +1,19 @@ -adrf==0.1.5 -asgiref==3.7.2 -celery==5.3.6 +adrf==0.1.6 +asgiref==3.8.1 +celery==5.4.0 certifi==2024.2.2 cffi==1.16.0 -channels==4.0.0 +channels==4.1.0 channels_redis==4.2.0 cryptography==42.0.5 Django==4.2.11 django-cors-headers==4.3.1 django-filter==24.2 django-rest-knox==4.2.0 -djangorestframework==3.14.0 -drf-spectacular==0.27.1 +djangorestframework==3.15.1 +drf-spectacular==0.27.2 hiredis==2.3.2 +kombu==5.3.7 meshctrl==0.1.15 msgpack==1.0.8 nats-py==2.7.2 @@ -28,19 +29,19 @@ qrcode==7.4.2 redis==5.0.3 requests==2.31.0 six==1.16.0 -sqlparse==0.4.4 +sqlparse==0.5.0 twilio==8.13.0 urllib3==2.2.1 uvicorn[standard]==0.29.0 -uWSGI==2.0.24 +uWSGI==2.0.25.1 validators==0.24.0 vine==5.1.0 websockets==12.0 zipp==3.18.1 -pandas==2.2.1 +pandas==2.2.2 kaleido==0.2.1 jinja2==3.1.3 markdown==3.6 -plotly==5.20.0 +plotly==5.21.0 weasyprint==61.2 ocxsect==0.1.5 \ No newline at end of file diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index 7bd47cd21e..0a36bf02e7 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -35,7 +35,7 @@ MESH_VER = "1.1.21" -NATS_SERVER_VER = "2.10.12" +NATS_SERVER_VER = "2.10.14" # Install Nushell on the agent # https://github.com/nushell/nushell From 897e1d4539430bd9e641b3b50e226c42737e2154 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Mon, 22 Apr 2024 17:32:05 +0000 Subject: [PATCH 07/11] fix script name fixes #1852 --- api/tacticalrmm/alerts/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tacticalrmm/alerts/models.py b/api/tacticalrmm/alerts/models.py index f008843380..7a2982eeac 100644 --- a/api/tacticalrmm/alerts/models.py +++ b/api/tacticalrmm/alerts/models.py @@ -588,7 +588,7 @@ def handle_alert_resolve( hist = AgentHistory.objects.create( agent=agent, type=AgentHistoryType.SCRIPT_RUN, - script=alert_template.action, + script=alert_template.resolved_action, username="alert-action-resolved", ) r = agent.run_script( From 168f053c6fd1ccfdcdd8de31c133f3a02bc0e0ef Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Mon, 22 Apr 2024 18:12:02 +0000 Subject: [PATCH 08/11] revert, already fixed in #1823 --- api/tacticalrmm/alerts/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tacticalrmm/alerts/models.py b/api/tacticalrmm/alerts/models.py index 7a2982eeac..f008843380 100644 --- a/api/tacticalrmm/alerts/models.py +++ b/api/tacticalrmm/alerts/models.py @@ -588,7 +588,7 @@ def handle_alert_resolve( hist = AgentHistory.objects.create( agent=agent, type=AgentHistoryType.SCRIPT_RUN, - script=alert_template.resolved_action, + script=alert_template.action, username="alert-action-resolved", ) r = agent.run_script( From 8cfba49559471a40324b9eb17eb512473e111c1e Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:03:22 +0000 Subject: [PATCH 09/11] add noninteractive --- backup.sh | 2 ++ install.sh | 4 +++- restore.sh | 4 +++- update.sh | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index 6f6a6f56ea..f1f50efc4b 100755 --- a/backup.sh +++ b/backup.sh @@ -2,6 +2,8 @@ SCRIPT_VERSION="32" +export DEBIAN_FRONTEND=noninteractive + GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' diff --git a/install.sh b/install.sh index b4f217932c..2436561c51 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_VERSION="83" +SCRIPT_VERSION="84" SCRIPT_URL="https://raw.githubusercontent.com/amidaware/tacticalrmm/master/install.sh" sudo apt install -y curl wget dirmngr gnupg lsb-release ca-certificates @@ -33,6 +33,8 @@ fi rm -f $TMP_FILE +export DEBIAN_FRONTEND=noninteractive + if [ -d /rmm/api/tacticalrmm ]; then echo -ne "${RED}ERROR: Existing trmm installation found. The install script must be run on a clean server.${NC}\n" exit 1 diff --git a/restore.sh b/restore.sh index fc9b452846..5bf5669efb 100755 --- a/restore.sh +++ b/restore.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_VERSION="57" +SCRIPT_VERSION="58" SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/restore.sh' sudo apt update @@ -29,6 +29,8 @@ fi rm -f $TMP_FILE +export DEBIAN_FRONTEND=noninteractive + if [ -d /rmm/api/tacticalrmm ]; then echo -ne "${RED}ERROR: Existing trmm installation found. The restore script must be run on a clean server, please re-read the docs.${NC}\n" exit 1 diff --git a/update.sh b/update.sh index fd67c37c85..c27eac7309 100644 --- a/update.sh +++ b/update.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_VERSION="152" +SCRIPT_VERSION="153" 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' @@ -26,6 +26,8 @@ fi rm -f $TMP_FILE +export DEBIAN_FRONTEND=noninteractive + force=false if [[ $* == *--force* ]]; then force=true From 60126a8cc5fe10cebfa047535db4fdb1fb879516 Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Tue, 7 May 2024 02:30:06 +0000 Subject: [PATCH 10/11] update reqs --- api/tacticalrmm/requirements-dev.txt | 2 +- api/tacticalrmm/requirements-test.txt | 2 +- api/tacticalrmm/requirements.txt | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/tacticalrmm/requirements-dev.txt b/api/tacticalrmm/requirements-dev.txt index 3e2a82c159..af6bbf34c2 100644 --- a/api/tacticalrmm/requirements-dev.txt +++ b/api/tacticalrmm/requirements-dev.txt @@ -1,5 +1,5 @@ black -daphne==4.1.0 +daphne Werkzeug django-extensions isort diff --git a/api/tacticalrmm/requirements-test.txt b/api/tacticalrmm/requirements-test.txt index 81ab52b32a..5b9d63a7fe 100644 --- a/api/tacticalrmm/requirements-test.txt +++ b/api/tacticalrmm/requirements-test.txt @@ -7,4 +7,4 @@ pytest-xdist pytest-cov refurb flake8 -daphne==4.1.0 \ No newline at end of file +daphne \ No newline at end of file diff --git a/api/tacticalrmm/requirements.txt b/api/tacticalrmm/requirements.txt index 38892bbd57..337b270281 100644 --- a/api/tacticalrmm/requirements.txt +++ b/api/tacticalrmm/requirements.txt @@ -5,8 +5,8 @@ certifi==2024.2.2 cffi==1.16.0 channels==4.1.0 channels_redis==4.2.0 -cryptography==42.0.5 -Django==4.2.11 +cryptography==42.0.7 +Django==4.2.12 django-cors-headers==4.3.1 django-filter==24.2 django-rest-knox==4.2.0 @@ -26,7 +26,7 @@ pyotp==2.9.0 pyparsing==3.1.2 python-ipware==2.0.2 qrcode==7.4.2 -redis==5.0.3 +redis==5.0.4 requests==2.31.0 six==1.16.0 sqlparse==0.5.0 @@ -40,8 +40,8 @@ websockets==12.0 zipp==3.18.1 pandas==2.2.2 kaleido==0.2.1 -jinja2==3.1.3 +jinja2==3.1.4 markdown==3.6 -plotly==5.21.0 -weasyprint==61.2 +plotly==5.22.0 +weasyprint==62.1 ocxsect==0.1.5 \ No newline at end of file From 868025ffa30c4cf53948cdf354100f3113794cba Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Thu, 16 May 2024 19:40:22 +0000 Subject: [PATCH 11/11] update reqs --- api/tacticalrmm/requirements.txt | 4 ++-- docker/containers/tactical-nats/dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/tacticalrmm/requirements.txt b/api/tacticalrmm/requirements.txt index 337b270281..14e6323b97 100644 --- a/api/tacticalrmm/requirements.txt +++ b/api/tacticalrmm/requirements.txt @@ -6,7 +6,7 @@ cffi==1.16.0 channels==4.1.0 channels_redis==4.2.0 cryptography==42.0.7 -Django==4.2.12 +Django==4.2.13 django-cors-headers==4.3.1 django-filter==24.2 django-rest-knox==4.2.0 @@ -19,7 +19,7 @@ msgpack==1.0.8 nats-py==2.7.2 packaging==24.0 psutil==5.9.8 -psycopg[binary]==3.1.18 +psycopg[binary]==3.1.19 pycparser==2.21 pycryptodome==3.20.0 pyotp==2.9.0 diff --git a/docker/containers/tactical-nats/dockerfile b/docker/containers/tactical-nats/dockerfile index c1aa47efb4..db8d7fefdb 100644 --- a/docker/containers/tactical-nats/dockerfile +++ b/docker/containers/tactical-nats/dockerfile @@ -1,4 +1,4 @@ -FROM nats:2.10.12-alpine +FROM nats:2.10.14-alpine ENV TACTICAL_DIR /opt/tactical ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready