1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Create the Aphlict PID directory

Summary: Fixes T6944. Create the Aphlict PID directory if it does not exist. See also D11387.

Test Plan: Started Aphlict... saw PID directory created.

Reviewers: anton.vladimirov, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6944

Differential Revision: https://secure.phabricator.com/D11906
This commit is contained in:
Joshua Spence 2015-02-28 13:49:45 +11:00
parent 6f21cfbe10
commit 6581759259

View file

@ -31,7 +31,21 @@ abstract class PhabricatorAphlictManagementWorkflow
}
final public function getPIDPath() {
return PhabricatorEnv::getEnvConfig('notification.pidfile');
$path = PhabricatorEnv::getEnvConfig('notification.pidfile');
try {
$dir = dirname($path);
if (!Filesystem::pathExists($dir)) {
Filesystem::createDirectory($dir, 0755, true);
}
} catch (FilesystemException $ex) {
throw new Exception(
pht(
"Failed to create '%s'. You should manually create this directory.",
$dir));
}
return $path;
}
final public function getLogPath() {