diff options
-rw-r--r-- | openvpn-model.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openvpn-model.lua b/openvpn-model.lua index 66ce958..3c8ce6f 100644 --- a/openvpn-model.lua +++ b/openvpn-model.lua @@ -283,7 +283,7 @@ function mymodule.upload_cert(self, newcert) if success then if not posix.stat(certurl) then - posix.mkdir(certurl) + fs.create_directory(certurl) end -- copy the keys fs.move_file(newcert.value.cert.value.."cert.pem", certurl..newcert.value.name.value.."-cert.pem") @@ -323,6 +323,9 @@ mymodule.get_generate_dh_params = function(self, clientdata) end mymodule.generate_dh_params = function(self, gen) + if not posix.stat(certurl) then + fs.create_directory(certurl) + end gen.descr, gen.errtxt = modelfunctions.run_executable({"openssl", "dhparam", "-out", certurl.."dh1024.pem", "1024"}, true) return gen end |