diff options
author | Kim Alvefur <zash@zash.se> | 2015-09-26 21:39:26 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-09-26 21:39:26 +0200 |
commit | af84a2e79ba6c5ea22fd79e6f23a85ac3bd5cfeb (patch) | |
tree | bc4cbaa4df5861d957f7eed5c4be04029167faa2 | |
parent | ea219ecbdcd08607b7e54b56ffaa3ac10aa9801a (diff) | |
download | prosody-af84a2e79ba6c5ea22fd79e6f23a85ac3bd5cfeb.tar.gz prosody-af84a2e79ba6c5ea22fd79e6f23a85ac3bd5cfeb.zip |
mod_posix: Normalize indentation
-rw-r--r-- | plugins/mod_posix.lua | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index c9b9f3aa..e9e43fa0 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -31,27 +31,27 @@ pposix.umask(umask); -- Allow switching away from root, some people like strange ports. module:hook("server-started", function () - local uid = module:get_option("setuid"); - local gid = module:get_option("setgid"); - if gid then - local success, msg = pposix.setgid(gid); - if success then - module:log("debug", "Changed group to %s successfully.", gid); - else - module:log("error", "Failed to change group to %s. Error: %s", gid, msg); - prosody.shutdown("Failed to change group to %s", gid); - end + local uid = module:get_option("setuid"); + local gid = module:get_option("setgid"); + if gid then + local success, msg = pposix.setgid(gid); + if success then + module:log("debug", "Changed group to %s successfully.", gid); + else + module:log("error", "Failed to change group to %s. Error: %s", gid, msg); + prosody.shutdown("Failed to change group to %s", gid); end - if uid then - local success, msg = pposix.setuid(uid); - if success then - module:log("debug", "Changed user to %s successfully.", uid); - else - module:log("error", "Failed to change user to %s. Error: %s", uid, msg); - prosody.shutdown("Failed to change user to %s", uid); - end + end + if uid then + local success, msg = pposix.setuid(uid); + if success then + module:log("debug", "Changed user to %s successfully.", uid); + else + module:log("error", "Failed to change user to %s. Error: %s", uid, msg); + prosody.shutdown("Failed to change user to %s", uid); end - end); + end +end); -- Don't even think about it! if not prosody.start_time then -- server-starting |