From 2688a47436dca84d83e19bdb853453be861fe071 Mon Sep 17 00:00:00 2001 From: sadnub Date: Tue, 24 Nov 2020 23:28:44 -0500 Subject: [PATCH] fix settings --- api/tacticalrmm/tacticalrmm/utils.py | 5 ++--- install.sh | 1 - web/.env.example | 3 +-- web/src/components/Deployment.vue | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/api/tacticalrmm/tacticalrmm/utils.py b/api/tacticalrmm/tacticalrmm/utils.py index ffee9d72..e2cda208 100644 --- a/api/tacticalrmm/tacticalrmm/utils.py +++ b/api/tacticalrmm/tacticalrmm/utils.py @@ -1,7 +1,6 @@ import json import os import subprocess -from tacticalrmm.settings import DOCKER_BUILD import tldextract from django.conf import settings @@ -19,7 +18,7 @@ def reload_nats(): for agent in agents: users.append({"user": agent.agent_id, "password": agent.user.auth_token.key}) - if not DOCKER_BUILD: + if not settings.DOCKER_BUILD: tld = tldextract.extract(settings.ALLOWED_HOSTS[0]) domain = tld.domain + "." + tld.suffix cert_path = f"/etc/letsencrypt/live/{domain}" @@ -39,5 +38,5 @@ def reload_nats(): with open(conf, "w") as f: json.dump(config, f) - if not DOCKER_BUILD: + if not settings.DOCKER_BUILD: subprocess.run(["/usr/local/bin/nats-server", "-signal", "reload"]) diff --git a/install.sh b/install.sh index c6b32765..b0d2171b 100644 --- a/install.sh +++ b/install.sh @@ -330,7 +330,6 @@ if not DEBUG: ) }) -NATS_HOST = "${rmmdomain}" SALT_USERNAME = "saltapi" SALT_PASSWORD = "${SALTPW}" SALT_HOST = "127.0.0.1" diff --git a/web/.env.example b/web/.env.example index 89954a01..d65dc107 100644 --- a/web/.env.example +++ b/web/.env.example @@ -2,5 +2,4 @@ PROD_URL = "https://api.example.com" DEV_URL = "https://api.example.com" APP_URL = "https://app.example.com" DEV_HOST = 0.0.0.0 -DEV_PORT = 80 -DOCKER_BUILD = false \ No newline at end of file +DEV_PORT = 80 \ No newline at end of file diff --git a/web/src/components/Deployment.vue b/web/src/components/Deployment.vue index 24502cca..3e78ffd6 100644 --- a/web/src/components/Deployment.vue +++ b/web/src/components/Deployment.vue @@ -119,7 +119,7 @@ export default { }); }, copyLink(props) { - const api = getBaseUrl; + const api = getBaseUrl(); copyToClipboard(`${api}/clients/${props.row.uid}/deploy/`).then(() => { this.notifySuccess("Link copied to clipboard", 1500); });