aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-09-26 21:39:26 +0200
committerKim Alvefur <zash@zash.se>2015-09-26 21:39:26 +0200
commitb456d66edb94ee5d10524e94606a5980dcb3c9c1 (patch)
treebc4cbaa4df5861d957f7eed5c4be04029167faa2 /plugins
parent3d29bb52de30cc4662a167d2cdab046c7d642b74 (diff)
downloadprosody-b456d66edb94ee5d10524e94606a5980dcb3c9c1.tar.gz
prosody-b456d66edb94ee5d10524e94606a5980dcb3c9c1.zip
mod_posix: Normalize indentation
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_posix.lua38
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