mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 08:12:40 +01:00
phd - on start command accurately detect if daemons are running before erroring out
Summary: loadRunningDaemons loads daemons that may be running (have a file pid). other commands handle this appropriately so just make sure the start command knows whats up Test Plan: phd start, stop, reload all seemed to work just fine. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1284 Differential Revision: https://secure.phabricator.com/D2808
This commit is contained in:
parent
a4e2eb3d8c
commit
26ca5cbbe3
1 changed files with 5 additions and 1 deletions
|
@ -56,7 +56,11 @@ switch ($command) {
|
|||
/* Fall Through */
|
||||
case 'start':
|
||||
$running = $control->loadRunningDaemons();
|
||||
if ($running) {
|
||||
// "running" might not mean actually running so much as was running at
|
||||
// some point. ergo, do a quick grouping and only barf if daemons are
|
||||
// *actually* running.
|
||||
$running_dict = mgroup($running, 'isRunning');
|
||||
if (!empty($running_dict[true])) {
|
||||
echo phutil_console_wrap(
|
||||
"phd start: Unable to start daemons because daemons are already ".
|
||||
"running.\n".
|
||||
|
|
Loading…
Reference in a new issue