From 24bfaa179d4975184ab1b43653fe57bb717f76d6 Mon Sep 17 00:00:00 2001 From: Matteo Valentini Date: Fri, 13 Sep 2024 12:21:15 +0200 Subject: [PATCH] upload-certificate: fix event payload --- imageroot/actions/upload-certificate/23export_certificates | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imageroot/actions/upload-certificate/23export_certificates b/imageroot/actions/upload-certificate/23export_certificates index fff4e23..a390c88 100755 --- a/imageroot/actions/upload-certificate/23export_certificates +++ b/imageroot/actions/upload-certificate/23export_certificates @@ -31,11 +31,11 @@ result = subprocess.run( ) subject = result.stdout -domain = subject.split("\n")[1].split("CN=")[1] +domain = {'main': subject.split("\n")[1].split("CN=")[1]} # save the certificate and key in redis rdb = agent.redis_connect(privileged=True) -rkey = f'module/{module_id}/certificate/{domain}' +rkey = f'module/{module_id}/certificate/{domain["main"]}' rdb.hset(rkey, mapping={"cert": data["certFile"], "key": data["keyFile"], "custom": "true"}) # signal the certificate-updated event