Proc::Daemontools

Perl interface for the functionalities of Daemontools
Download

Proc::Daemontools Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Bruno Negrao
  • Publisher web site:
  • http://search.cpan.org/~bnegrao/

Proc::Daemontools Tags


Proc::Daemontools Description

Perl interface for the functionalities of Daemontools Proc::Daemontools is a Perl interface for the functionalities of Daemontools.SYNOPSIS use Proc::Daemontools; my $svc = new Proc::Daemontools; # default directories assumed or my $svc = new Proc::Daemontools ( DAEMONTOOLS_DIR => "/some-non-default-dir", SERVICE_DIR => "/some-non-default-dir", DAEMON => "daemon-name" # optional: a default daemon ); if ( $svc->is_up() ) { print $svc->daemon(), " IS UP! "; } my $daemon="qmail-send"; # We want to stop $daemon instead of the default daemon if ( $svc->is_up($daemon) ) { if ( $svc->down($daemon) ) { print "OK, $daemon stopped. "; } else { print "Ops, $daemon didn´t stop yet. Maybe it is waiting" . " for some child to exit. Perhaps you want to kill" . " that child by yourself... "; } } # Now we want it to start if ( $svc->up($daemon) ) { print "OK, $daemon started. ". } # Let´s set the default daemon to be qmail-smtpd $svc->daemon("qmail-smtpd"); # Let´s see what svstat says about it: print "The current status of " . $svc->daemon() . " " . "reported by svstat is: " . $svc->status() . " "; Requirements: · Perl


Proc::Daemontools Related Software