Software /
code /
prosody
Diff
prosodyctl @ 8108:939ccedb509d
prosodyctl: Verify that directory certs are written to exists
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Apr 2017 14:34:53 +0200 |
parent | 8107:83d776b344ad |
child | 8109:2f214c4db170 |
line wrap: on
line diff
--- a/prosodyctl Fri Apr 21 14:24:59 2017 +0200 +++ b/prosodyctl Fri Apr 21 14:34:53 2017 +0200 @@ -831,6 +831,10 @@ openssl = require "util.openssl"; lfs = require "lfs"; local cert_dir_attrs = lfs.attributes(cert_basedir); + if not cert_dir_attrs then + show_warning("The directory "..cert_basedir.." does not exist"); + return 1; -- TODO Should we create it? + end if pposix.getuid() ~= cert_dir_attrs.uid then show_warning("The directory "..cert_basedir.." is not owned by the current user, won't be able to write files to it"); return 1;