From 68d455e1547fe468d680a3f37ddf18f1eabd81e1 Mon Sep 17 00:00:00 2001 From: andryyy Date: Mon, 19 Jun 2017 10:30:11 +0200 Subject: [PATCH] Just start reconf-sogo to also trigger SOGos restart after a successful reconfiguration --- data/web/inc/call_sogo_ctrl.php | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/data/web/inc/call_sogo_ctrl.php b/data/web/inc/call_sogo_ctrl.php index 4d6dc952..7c7cff9e 100644 --- a/data/web/inc/call_sogo_ctrl.php +++ b/data/web/inc/call_sogo_ctrl.php @@ -17,23 +17,9 @@ if ($_GET['ACTION'] == "start") { if (isset($response['faultString'])) { echo '' . $response['faultString'] . ''; } - else { - sleep(4); - $request = xmlrpc_encode_request("supervisor.startProcess", 'sogo', array('encoding'=>'utf-8')); - $context = stream_context_create(array('http' => array( - 'method' => "POST", - 'header' => "Content-Length: " . strlen($request), - 'content' => $request - ))); - $file = @file_get_contents("http://sogo:9191/RPC2", false, $context) or die("Cannot connect to $remote_server:$listener_port"); - $response = xmlrpc_decode($file); - if (isset($response['faultString'])) { - echo '' . $response['faultString'] . ''; - } - else { - echo 'OK'; - } - } + else { + echo 'OK'; + } } elseif ($_GET['ACTION'] == "stop") { $request = xmlrpc_encode_request("supervisor.stopProcess", 'sogo', array('encoding'=>'utf-8')); @@ -48,7 +34,7 @@ elseif ($_GET['ACTION'] == "stop") { echo '' . $response['faultString'] . ''; } else { - sleep(1); + sleep(4); $request = xmlrpc_encode_request("supervisor.stopProcess", 'reconf-domains', array('encoding'=>'utf-8')); $context = stream_context_create(array('http' => array( 'method' => "POST",