Add virtual machine support
[gruntmaster-daemon.git] / lib / Gruntmaster / Daemon.pm
index a84fc57cfeb3dff949f0eef1ac3c02cf03240b29..1d1ca01f9544c895168dd27e7ed356c3af2cebaf 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 our $VERSION = '5999.000_004';
 
 use Gruntmaster::Daemon::Constants qw/ERR/;
-use Gruntmaster::Daemon::Format qw/prepare_files/;
+use Gruntmaster::Daemon::Format qw/prepare_files stopvms/;
 
 use File::Basename qw/fileparse/;
 use File::Temp qw/tempdir/;
@@ -127,6 +127,7 @@ sub process{
                $meta->{result} = -1;
                $meta->{result_text} = $_;
        };
+       stopvms;
 
        get_logger->info("Job result: " . $meta->{result_text});
        return unless $jobr;
@@ -169,6 +170,7 @@ sub got_job{
 }
 
 sub run{
+       warn "No GRUNTMASTER_VM environment variable. Running without a VM is a security risk.\n"  unless $ENV{GRUNTMASTER_VM};
        require Gruntmaster::Data;
        $db = Gruntmaster::Data->connect('dbi:Pg:');
        Log::Log4perl->init('/etc/gruntmasterd/gruntmasterd-log.conf');
This page took 0.009854 seconds and 4 git commands to generate.