Software /
code /
prosody
Changeset
9544:cbd3b9d4c60b
prosodyctl: Change ownership of certs to same as the cert base dir when running from a source checkout
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 24 Oct 2018 17:13:49 +0200 |
parents | 9543:92bfb12684b0 |
children | 9545:9dc7280dd8dc 9642:e31053344231 |
files | prosodyctl |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/prosodyctl Wed Oct 24 17:04:17 2018 +0200 +++ b/prosodyctl Wed Oct 24 17:13:49 2018 +0200 @@ -867,7 +867,10 @@ end assert(input:close()); assert(output:close()); - if owner and group then + if not prosody.installed then + -- FIXME this is possibly specific to GNU chown + os.execute(("chown -c --reference=%s %s"):format(sh_esc(cert_basedir), sh_esc(to))); + elseif owner and group then local ok = os.execute(("chown %s:%s %s"):format(sh_esc(owner), sh_esc(group), sh_esc(to))); assert(ok == true or ok == 0, "Failed to change ownership of "..to); end