Maxi Schvindt %!s(int64=7) %!d(string=hai) anos
pai
achega
b895ce0d2f
Modificáronse 1 ficheiros con 10 adicións e 4 borrados
  1. 10 4
      src/StatsBundle/Command/GenerateRemoteCrontabCommand.php

+ 10 - 4
src/StatsBundle/Command/GenerateRemoteCrontabCommand.php

@@ -257,12 +257,18 @@ class GenerateRemoteCrontabCommand extends ContainerAwareCommand
                 }
                 }
                 $commands[] = "*/{$timeOctets} * * * * {$pathConsole} {$amqpRemote} {$routing_key} cmts:octets {$params}";
                 $commands[] = "*/{$timeOctets} * * * * {$pathConsole} {$amqpRemote} {$routing_key} cmts:octets {$params}";
 
 
-                $params = "--cmts-device-id={$deviceId} --cmts-server-id={$serverId}";
-                if ($amqp) $params = "--args=--cmts-device-id:{$deviceId} --args=--cmts-server-id:{$serverId}";
+                if ($amqp) {
+                    $params = "--args=--cmts-device-id:{$deviceId} --args=--cmts-server-id:{$serverId}";
+                } else {
+                    $params = "--cmts-device-id={$deviceId} --cmts-server-id={$serverId}";
+                }
                 $commands[] = "*/{$timeScan} * * * * {$pathConsole} {$amqpRemote} {$routing_key} stats:interface {$params}";
                 $commands[] = "*/{$timeScan} * * * * {$pathConsole} {$amqpRemote} {$routing_key} stats:interface {$params}";
                 
                 
-                $params .= " --generate-remote-commands=0";
-                if ($amqp) $params .= " --args=--generate-remote-commands:0";
+                if ($amqp) {
+                    $params .= " --args=--generate-remote-commands:0";
+                } else {
+                    $params .= " --generate-remote-commands=0";
+                }
                 $commands[] = "*/{$timeScan} * * * * {$pathConsole} {$amqpRemote} {$routing_key} stats:cm {$params}";
                 $commands[] = "*/{$timeScan} * * * * {$pathConsole} {$amqpRemote} {$routing_key} stats:cm {$params}";
                 
                 
                 $content .= PHP_EOL . "# CMTS {$description} ({$deviceIp})" . PHP_EOL;
                 $content .= PHP_EOL . "# CMTS {$description} ({$deviceIp})" . PHP_EOL;