Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement