I'm open to other ways to make this check happen for each of the daemons if anyone has any ideas.
Thanks!
my @loc_daemons = qw( crond winbindd smbd nmbd cups sshd zappa ); sub check_daemons { my ($process, $allcool, $psaxline); my @psax_list = `ps ax`; foreach $process (@loc_daemons) { chomp $process; # Just in case $allcool = 'true'; foreach $psaxline (@psax_list) { if ($psaxline =~ "$process") { $allcool = 'true' unless ($allcool eq +'false'); } else { $allcool = 'false'; } } if ($allcool eq 'false') { $output .= "$process does not appear to be run +ning!\n"; $hellbrokeloose = 'true'; } } }
In reply to Checking a running daemon by Kickstart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |