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