Mercurial > prosody-hg
comparison util/startup.lua @ 13463:3ce550ce44ce
util.startup: Don't use not yet existent shutdown procedure when started as root (thanks SigmaTel71)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 24 Mar 2024 21:31:47 +0100 |
| parents | 720aed1f5cf2 |
| children | 2dbc169aae6a |
comparison
equal
deleted
inserted
replaced
| 13462:720aed1f5cf2 | 13463:3ce550ce44ce |
|---|---|
| 692 if not pposix then return end | 692 if not pposix then return end |
| 693 -- Don't even think about it! | 693 -- Don't even think about it! |
| 694 if pposix.getuid() == 0 and not config.get("*", "run_as_root") then | 694 if pposix.getuid() == 0 and not config.get("*", "run_as_root") then |
| 695 log("error", "Danger, Will Robinson! Prosody doesn't need to be run as root, so don't do it!"); | 695 log("error", "Danger, Will Robinson! Prosody doesn't need to be run as root, so don't do it!"); |
| 696 log("error", "For more information on running Prosody as root, see https://prosody.im/doc/root"); | 696 log("error", "For more information on running Prosody as root, see https://prosody.im/doc/root"); |
| 697 prosody.shutdown("Refusing to run as root", 1); | 697 os.exit(1); -- Refusing to run as root |
| 698 end | 698 end |
| 699 end | 699 end |
| 700 | 700 |
| 701 local function remove_pidfile() | 701 local function remove_pidfile() |
| 702 local pidfile = prosody.pidfile; | 702 local pidfile = prosody.pidfile; |
