add helper
This commit is contained in:
parent
97310b091e
commit
c2e444249a
|
@ -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)
|
||||
|
|
|
@ -450,4 +450,6 @@ CONFIG_MGMT_CMDS = (
|
|||
"meshuser",
|
||||
"meshtoken",
|
||||
"meshdomain",
|
||||
"certfile",
|
||||
"keyfile",
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue