Skip to content
Snippets Groups Projects
Commit cc416b88 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update shell plugins

parent f392b912
No related branches found
No related tags found
1 merge request!62V2.0
This commit is part of merge request !62. Comments created here will be created in the context of that merge request.
......@@ -36,7 +36,6 @@ class rollout_ssh extends rollout_base {
public function getDeployCommands($sPhase,$bMask=false){
$aReturn=array();
$aConfig=$this->getConfig($sPhase);
$aTargethosts = explode(',', $aConfig['hosts']);
// loop over hosts and create shell commands for it
foreach(explode(',', $aConfig['hosts']) as $sMyHost){
......
......@@ -8,11 +8,10 @@
*/
class shellcmd_load {
/**
* @var command line to exectute
* @var fallback command line to exectute; command in config.josn has priority
*/
protected $_command='uptime';
/**
* constructor ... returns command
* @return string
......@@ -35,7 +34,7 @@ class shellcmd_load {
return $this->_command;
}
/**
* parse output and extract wanted values in section "data"
* @return array
......
......@@ -14,6 +14,7 @@ class shellcmd {
protected $_oPlugin=false;
protected $_aReturn=false;
protected $_aResult=[];
protected $_debug=false;
/**
......@@ -90,8 +91,9 @@ class shellcmd {
if (!$this->_oPlugin){
return $this->_aReturn;
}
$sCmd=$this->_oPlugin->getCommand();
$sInfofile=$this->_sPlugin.'/config.json';
$aMeta=json_decode(file_get_contents($sInfofile), 1);
$sCmd=isset($aMeta['command']) ? $aMeta['command'] : $this->_oPlugin->getCommand();
$this->_wd("sCmd=$sCmd");
$this->_aResult=$this->_execCommand($sCmd);
......
......@@ -8,10 +8,9 @@
*/
class shellcmd_processes {
/**
* @var command line to exectute
* @var fallback command line to exectute; command in config.josn has priority
*/
protected $_command="ps -f --forest | egrep -v '[/\ ](apache|httpd|php-fpm)' | fgrep -v 'ps -f' | fgrep -v grep";
// protected $_command="ps -ef --forest ";
protected $_command="ps -ef --forest ";
/**
* constructor ... returns command
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment