Software /
code /
prosody
Comparison
prosodyctl @ 8110:9aeb1c631f62
prosodyctl: Split long line [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Apr 2017 14:44:28 +0200 (2017-04-21) |
parent | 8109:2f214c4db170 |
child | 8111:3cbb311f8468 |
comparison
equal
deleted
inserted
replaced
8109:2f214c4db170 | 8110:9aeb1c631f62 |
---|---|
137 | 137 |
138 local want_pposix_version = "0.4.0"; | 138 local want_pposix_version = "0.4.0"; |
139 local have_pposix, pposix = pcall(require, "util.pposix"); | 139 local have_pposix, pposix = pcall(require, "util.pposix"); |
140 | 140 |
141 if have_pposix and pposix then | 141 if have_pposix 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 |
143 print(string.format("Unknown version (%s) of binary pposix module, expected %s", | |
144 tostring(pposix._VERSION), want_pposix_version)); return; | |
145 end | |
143 current_uid = pposix.getuid(); | 146 current_uid = pposix.getuid(); |
144 local arg_root = arg[1] == "--root"; | 147 local arg_root = arg[1] == "--root"; |
145 if arg_root then table.remove(arg, 1); end | 148 if arg_root then table.remove(arg, 1); end |
146 if current_uid == 0 and config.get("*", "run_as_root") ~= true and not arg_root then | 149 if current_uid == 0 and config.get("*", "run_as_root") ~= true and not arg_root then |
147 -- We haz root! | 150 -- We haz root! |