Commit 4b01e49b authored by Ted Trask's avatar Ted Trask

Changed os.rename to fs.move_file.

parent b3966f08
......@@ -237,9 +237,9 @@ function upload_cert(newcert)
posix.mkdir(baseurl)
end
-- copy the keys
os.rename(newcert.value.cert.value.."cert.pem", baseurl..newcert.value.name.value.."-cert.pem")
os.rename(newcert.value.cert.value.."key.pem", baseurl..newcert.value.name.value.."-key.pem")
os.rename(newcert.value.cert.value.."ca.pem", baseurl..newcert.value.name.value.."-ca.pem")
fs.move_file(newcert.value.cert.value.."cert.pem", baseurl..newcert.value.name.value.."-cert.pem")
fs.move_file(newcert.value.cert.value.."key.pem", baseurl..newcert.value.name.value.."-key.pem")
fs.move_file(newcert.value.cert.value.."ca.pem", baseurl..newcert.value.name.value.."-ca.pem")
posix.chmod(baseurl..newcert.value.name.value.."-key.pem", "rw-------")
else
newcert.errtxt = "Failed to upload certificate"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment