Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14037960
D13148.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D13148.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 11, 8:25 PM (1 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6715243
Default Alt Text
D13148.diff (3 KB)
Attached To
Mode
D13148: Allow Aphlict admin server to be specified
Attached
Detach File
Event Timeline
Log In to Comment