Page MenuHomePhabricator

D13148.id.diff
No OneTemporary

D13148.id.diff

diff --git a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
--- a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
+++ b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
@@ -3,15 +3,28 @@
abstract class PhabricatorAphlictManagementWorkflow
extends PhabricatorManagementWorkflow {
- private $debug = false;
+ private $adminHost;
+ private $adminPort;
private $clientHost;
private $clientPort;
+ private $debug = false;
+
protected function didConstruct() {
$this
->setArguments(
array(
array(
+ 'name' => 'admin-host',
+ 'param' => 'hostname',
+ 'help' => pht('Hostname to bind to for the admin server.'),
+ ),
+ array(
+ 'name' => 'admin-port',
+ 'param' => 'port',
+ 'help' => pht('Port to bind to for the admin server.'),
+ ),
+ array(
'name' => 'client-host',
'param' => 'hostname',
'help' => pht('Hostname to bind to for the client server.'),
@@ -25,6 +38,8 @@
}
public function execute(PhutilArgumentParser $args) {
+ $this->adminHost = $args->getArg('admin-host');
+ $this->adminPort = $args->getArg('admin-port');
$this->clientHost = $args->getArg('client-host');
$this->clientPort = $args->getArg('client-port');
return 0;
@@ -156,39 +171,41 @@
}
private function getServerArgv() {
- $ssl_key = PhabricatorEnv::getEnvConfig('notification.ssl-key');
- $ssl_cert = PhabricatorEnv::getEnvConfig('notification.ssl-cert');
+ $argv = array();
- $server_uri = PhabricatorEnv::getEnvConfig('notification.server-uri');
- $server_uri = new PhutilURI($server_uri);
+ $admin_uri = PhabricatorEnv::getEnvConfig('notification.server-uri');
+ $admin_uri = new PhutilURI($admin_uri);
+ $argv[] = '--admin-host='.coalesce(
+ $this->adminHost,
+ $admin_uri->getDomain());
+ $argv[] = '--admin-port='.coalesce(
+ $this->adminPort,
+ $admin_uri->getPort());
+
+ if ($this->clientHost) {
+ $argv[] = '--client-host'.$this->clientHost;
+ }
$client_uri = PhabricatorEnv::getEnvConfig('notification.client-uri');
$client_uri = new PhutilURI($client_uri);
-
- $log = $this->getLogPath();
-
- $server_argv = array();
- $server_argv[] = '--client-port='.coalesce(
+ $argv[] = '--client-port='.coalesce(
$this->clientPort,
$client_uri->getPort());
- $server_argv[] = '--admin-port='.$server_uri->getPort();
- $server_argv[] = '--admin-host='.$server_uri->getDomain();
+ $ssl_key = PhabricatorEnv::getEnvConfig('notification.ssl-key');
if ($ssl_key) {
- $server_argv[] = '--ssl-key='.$ssl_key;
+ $argv[] = '--ssl-key='.$ssl_key;
}
+ $ssl_cert = PhabricatorEnv::getEnvConfig('notification.ssl-cert');
if ($ssl_cert) {
- $server_argv[] = '--ssl-cert='.$ssl_cert;
+ $argv[] = '--ssl-cert='.$ssl_cert;
}
- $server_argv[] = '--log='.$log;
-
- if ($this->clientHost) {
- $server_argv[] = '--client-host='.$this->clientHost;
- }
+ $log = PhabricatorEnv::getEnvConfig('notification.log');
+ $argv[] = '--log='.$log;
- return $server_argv;
+ return $argv;
}
private function getAphlictScriptPath() {

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 16, 1:09 AM (4 w, 5 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6715243
Default Alt Text
D13148.id.diff (3 KB)

Event Timeline