Comparison

util/prosodyctl/cert.lua @ 12802:4a8740e01813

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 12 Dec 2022 07:10:54 +0100
parent 12786:5d4957c8a972
child 12975:d10957394a3c
comparison
equal deleted inserted replaced
12801:ebd6b4d8bf04 12802:4a8740e01813
177 if not prosody.installed then 177 if not prosody.installed then
178 -- FIXME this is possibly specific to GNU chown 178 -- FIXME this is possibly specific to GNU chown
179 os.execute(("chown -c --reference=%s %s"):format(sh_esc(cert_basedir), sh_esc(to))); 179 os.execute(("chown -c --reference=%s %s"):format(sh_esc(cert_basedir), sh_esc(to)));
180 elseif owner and group then 180 elseif owner and group then
181 local ok = os.execute(("chown %s:%s %s"):format(sh_esc(owner), sh_esc(group), sh_esc(to))); 181 local ok = os.execute(("chown %s:%s %s"):format(sh_esc(owner), sh_esc(group), sh_esc(to)));
182 assert(ok == true or ok == 0, "Failed to change ownership of "..to); 182 assert(ok, "Failed to change ownership of "..to);
183 end 183 end
184 if old_umask then pposix.umask(old_umask); end 184 if old_umask then pposix.umask(old_umask); end
185 return true; 185 return true;
186 end 186 end
187 187