Created
February 12, 2016 01:49
-
-
Save preaction/5ba75f229229daa480fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Run a CPAN::Reporter::Smoker under the current Perl | |
# To start the daemon: | |
# perl smoker.pl start | |
# To stop the daemon: | |
# perl smoker.pl stop | |
# | |
# To start the smoker under all Perls in perlbrew: | |
# perlbrew exec perl smoker.pl start | |
use strict; | |
use warnings; | |
use Daemon::Control; | |
use Config; | |
# Uniquely identify this Perl by its version and archname | |
my $name = join( "-", $^V, $Config{archname} ); | |
exit Daemon::Control->new( | |
name => "CPAN::Reporter::Smoker", | |
program => $^X, | |
program_args => [ '-MCPAN::Reporter::Smoker', '-e', 'start' ], | |
pid_file => '/tmp/' . $name . '-smoker.pid', | |
stderr_file => '/tmp/' . $name . '-smoker.err', | |
stdout_file => '/tmp/' . $name . '-smoker.out', | |
fork => 2, | |
)->run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment