#!/usr/bin/env perl use strict; use warnings; #use Smart::Comments '####'; use FindBin; use lib "$FindBin::Bin/../lib"; use Getopt::Std; use Proc::Harness; $SIG{INT} = 'quit_handle'; $SIG{TERM} = 'quit_handle'; my %opts; if ($ARGV[0]) { getopts('f:', \%opts); } my $conf_file = $opts{f}; my $harness = Proc::Harness->new(); $harness->init($conf_file); $harness->harness_log('info', "The Proc::Harness daemon started."); $harness->start_procs(); $harness->start_monitor(); sub quit_handle { #$harness->kill_procs('SIGKILL'); undef $harness; exit(0); }