RC1 Omnishell for windows
This commit is contained in:
parent
c95855cd5d
commit
da0c8355c9
Binary file not shown.
|
@ -66,6 +66,10 @@ if (!defined($ConfFile) || !-e $ConfFile) {
|
|||
exit 1;
|
||||
}
|
||||
|
||||
if(!-d dirname($ConfFile).'\commands') {
|
||||
mkdir(dirname($ConfFile).'\commands');
|
||||
}
|
||||
|
||||
eval {
|
||||
# Check scheduled commands
|
||||
my $omnishell = new PandoraFMS::Omnishell(
|
||||
|
|
|
@ -2060,8 +2060,8 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
|
|||
|
||||
|
||||
/* Execute omnishell commands */
|
||||
omnishell_path = Pandora::getPandoraInstallDir ();
|
||||
omnishell_path += "util\\omnishell_client.exe \"" + conf_file+"\"";
|
||||
omnishell_path = '"'+Pandora::getPandoraInstallDir ();
|
||||
omnishell_path += "util\\omnishell_client.exe\" \"" + conf_file+"\"";
|
||||
if (getPandoraDebug () != false) {
|
||||
pandoraLog ("Omnishell: Running");
|
||||
}
|
||||
|
|
|
@ -231,6 +231,7 @@ sub new {
|
|||
%{$args},
|
||||
};
|
||||
|
||||
$self->{'temporal'} =~ s/\"|\'//g;
|
||||
$self = bless($self, $class);
|
||||
$self->prepare_commands();
|
||||
|
||||
|
@ -584,8 +585,8 @@ sub evaluate_command {
|
|||
# [0] because how library works.
|
||||
my $cmd = $self->{'commands'}->{$ref}->[0];
|
||||
|
||||
my $std_files = ' >> '.$self->{'temporal'}.'/'.$ref.'.stdout ';
|
||||
$std_files .= ' 2>> '.$self->{'temporal'}.'/'.$ref.'.stderr ';
|
||||
my $std_files = ' >> "'.$self->{'temporal'}.'/'.$ref.'.stdout" ';
|
||||
$std_files .= ' 2>> "'.$self->{'temporal'}.'/'.$ref.'.stderr" ';
|
||||
|
||||
# Check preconditions
|
||||
my $err_level;
|
||||
|
|
Loading…
Reference in New Issue