Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/usr/bin/env perl
  2.  
  3. # Run a CPAN::Reporter::Smoker under the current Perl
  4. # To start the daemon:
  5. # perl smoker.pl start
  6. # To stop the daemon:
  7. # perl smoker.pl stop
  8. #
  9. # To start the smoker under all Perls in perlbrew:
  10. # perlbrew exec perl smoker.pl start
  11.  
  12.  
  13. use strict;
  14. use warnings;
  15. use Daemon::Control;
  16. use Config;
  17.  
  18. # Uniquely identify this Perl by its version and archname
  19. my $name = join( "-", $^V, $Config{archname} );
  20.  
  21. exit Daemon::Control->new(
  22. name => "CPAN::Reporter::Smoker",
  23.  
  24. program => $^X,
  25. program_args => [ '-MCPAN::Reporter::Smoker', '-e', 'start' ],
  26.  
  27. pid_file => '/tmp/' . $name . '-smoker.pid',
  28. stderr_file => '/tmp/' . $name . '-smoker.err',
  29. stdout_file => '/tmp/' . $name . '-smoker.out',
  30.  
  31. fork => 2,
  32.  
  33. )->run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement