App-Foca

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    re-define this method if you want to add some extra security. By default
    all requests are valid at this point.

  run_cmd($connection, $name, $cmd, $params)
    Runs whatever the command is and sets a timeout to it. If it takes too
    long then it will try to kill the process.

    Depending on the settings given to the command it will return the STDOUT
    or STDERR or even both. The rules are:

    1. On success it will look for STDOUT, if nothing is there then it looks
    in STDERR. If nothing is foudn in STDERR and STDOUT then an empty string
    is returned.
    2. On error it will look for STDERR first, if nothing is there then it
    looks in STDOUT. If nothing is there then it returns an empty string.

    Both STDOUT and STDERR can be returned if the command is defined as
    follows:

        server_uptime:
            cmd: '/usr/bin/uptime'
            capture_all: 'y'

  load_commands()
    Load the commands YAML file and stores it in memory with Cache::FastMnap

lib/App/Foca/Server.pm  view on Meta::CPAN

=head2 B<run_cmd($connection, $name, $cmd, $params)>

Runs whatever the command is and sets a timeout to it. If it takes too long
then it will try to kill the process.

Depending on the settings given to the command it will return the STDOUT or
STDERR or even both. The rules are:

=over 4

=item 1. On success it will look for STDOUT, if nothing is there then it looks in
STDERR. If nothing is foudn in STDERR and STDOUT then an empty string is
returned.

=item 2. On error it will look for STDERR first, if nothing is there then it
looks in STDOUT. If nothing is there then it returns an empty string.

=back

Both STDOUT and STDERR can be returned if the command is defined as follows:

    server_uptime:
        cmd: '/usr/bin/uptime'
        capture_all: 'y'

=cut



( run in 0.454 second using v1.01-cache-2.11-cpan-64827b87656 )