add helper

This commit is contained in:
wh1te909 2023-10-25 20:21:06 +00:00
parent 97310b091e
commit c2e444249a
2 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@ from django.conf import settings
from django.core.management.base import BaseCommand
from tacticalrmm.helpers import get_webdomain
from tacticalrmm.utils import get_certs
class Command(BaseCommand):
@ -59,3 +60,9 @@ class Command(BaseCommand):
obj = core.mesh_token
self.stdout.write(obj)
case "certfile" | "keyfile":
crt, key = get_certs()
if kwargs["name"] == "certfile":
self.stdout.write(crt)
elif kwargs["name"] == "keyfile":
self.stdout.write(key)

View File

@ -450,4 +450,6 @@ CONFIG_MGMT_CMDS = (
"meshuser",
"meshtoken",
"meshdomain",
"certfile",
"keyfile",
)