Software / code / prosody
Comparison
prosodyctl @ 1120:23fa69b911f7
prosodyctl: Use correct path for the data directory
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 05 May 2009 15:47:34 +0100 |
| parent | 1115:8a7bc1a5eae6 |
| child | 1122:07b2b5942957 |
comparison
equal
deleted
inserted
replaced
| 1118:239d4362a040 | 1120:23fa69b911f7 |
|---|---|
| 59 print(""); | 59 print(""); |
| 60 os.exit(1); | 60 os.exit(1); |
| 61 end | 61 end |
| 62 end | 62 end |
| 63 | 63 |
| 64 local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data"; | |
| 65 require "util.datamanager".set_data_path(data_path); | |
| 66 | |
| 64 -- Switch away from root and into the prosody user -- | 67 -- Switch away from root and into the prosody user -- |
| 65 local switched_user, current_uid; | 68 local switched_user, current_uid; |
| 66 local ok, pposix = pcall(require, "util.pposix"); | 69 local ok, pposix = pcall(require, "util.pposix"); |
| 67 if ok and pposix then | 70 if ok and pposix then |
| 68 current_uid = pposix.getuid(); | 71 current_uid = pposix.getuid(); |