Mercurial > prosody-hg
comparison util/prosodyctl.lua @ 2386:bfb093a0df1e
util.prosodyctl: Saner determination of Prosody executable path
| author | Brian Cully <bjc@junctionnetworks.com> |
|---|---|
| date | Mon, 21 Dec 2009 16:52:12 +0000 |
| parents | 569d58d21612 |
| children | 62aa1b465e05 |
comparison
equal
deleted
inserted
replaced
| 2385:470004f8f4ed | 2386:bfb093a0df1e |
|---|---|
| 100 if ret then | 100 if ret then |
| 101 return false, "already-running"; | 101 return false, "already-running"; |
| 102 end | 102 end |
| 103 if not CFG_SOURCEDIR then | 103 if not CFG_SOURCEDIR then |
| 104 os.execute("./prosody"); | 104 os.execute("./prosody"); |
| 105 elseif CFG_SOURCEDIR:match("^/usr/local") then | |
| 106 os.execute("/usr/local/bin/prosody"); | |
| 107 else | 105 else |
| 108 os.execute("prosody"); | 106 os.execute(CFG_SOURCEDIR.."/../../bin/prosody"); |
| 109 end | 107 end |
| 110 return true; | 108 return true; |
| 111 end | 109 end |
| 112 | 110 |
| 113 function stop() | 111 function stop() |
