Révision ae03bc6f
Docker plugin
Fix autoconf support
| plugins/docker/docker_cpu | ||
|---|---|---|
| 39 | 39 |
|
| 40 | 40 |
=cut |
| 41 | 41 |
|
| 42 |
my @containers = split "\n" , `/usr/bin/docker ps --no-trunc=true`; |
|
| 42 |
my $docker=`which docker`; |
|
| 43 |
|
|
| 44 |
if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) {
|
|
| 45 |
if ($docker) {
|
|
| 46 |
print "yes\n"; |
|
| 47 |
exit 0; |
|
| 48 |
} |
|
| 49 |
else{
|
|
| 50 |
print "no (Docker has not been found)\n"; |
|
| 51 |
exit 0; |
|
| 52 |
} |
|
| 53 |
} |
|
| 54 |
|
|
| 55 |
$docker =~ s/\s+$//; |
|
| 56 |
|
|
| 57 |
my @containers = split "\n" , `$docker ps --no-trunc=true`; |
|
| 43 | 58 |
my $result; |
| 44 | 59 |
|
| 45 | 60 |
for my $i (1 .. $#containers) |
Formats disponibles : Unified diff