Comparison

prosodyctl @ 8010:49feb0da29e1

util.pposix: Add function for atomically appending data to a file
author Kim Alvefur <zash@zash.se>
date Wed, 01 Mar 2017 01:33:00 +0100
parent 7922:2fd20f372cb1
child 8012:e898c8fda986
comparison
equal deleted inserted replaced
8005:b472bccf8023 8010:49feb0da29e1
133 dependencies.log_warnings(); 133 dependencies.log_warnings();
134 134
135 -- Switch away from root and into the prosody user -- 135 -- Switch away from root and into the prosody user --
136 local switched_user, current_uid; 136 local switched_user, current_uid;
137 137
138 local want_pposix_version = "0.3.6"; 138 local want_pposix_version = "0.3.7";
139 local ok, pposix = pcall(require, "util.pposix"); 139 local ok, pposix = pcall(require, "util.pposix");
140 140
141 if ok and pposix then 141 if ok and pposix then
142 if pposix._VERSION ~= want_pposix_version then print(string.format("Unknown version (%s) of binary pposix module, expected %s", tostring(pposix._VERSION), want_pposix_version)); return; end 142 if pposix._VERSION ~= want_pposix_version then print(string.format("Unknown version (%s) of binary pposix module, expected %s", tostring(pposix._VERSION), want_pposix_version)); return; end
143 current_uid = pposix.getuid(); 143 current_uid = pposix.getuid();