You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

I have a cron script ( http://pastebin.ca/803903 ). I edited crontab using "crontab -e" and added the line ( http://pastebin.ca/803905 ). I DO have sendmail installed and running (I have send emails successfully from command line and also php scripts).

My problem is as follows: When the anope services daemon is not running, the cron script starts it, and outputs some text (Which I want to to be emailed to me). But cron opens up defunct zombie processes for sh and sendmail and I must kill the cron process.

The output of "ps -ef" showing the defunct processes is at http://pastebin.ca/803916
The sendmail process stays there until I kill the "/USR/SBIN/CRON" process.

How can I solve this? All I want is to be emailed when the services daemon isn't found. I'm running Ubuntu 7.10 Gusty.

If there's no errors in the services log, then what happens if you change the "./$ANOPROG" line to "exec ./$ANOPROG"? BTW this script is different from the default one in Anope 1.6.5? And the 6 line "if [ `ps auwx | grep $ANOPROG" if statement can be replaced with one "pgrep -f "ANOPATH/$ANOPROG 2>&1>/dev/null" && exit 0".

Well the issue isn't the fact that the services aren't starting or anything. I just want to be emailed with the output of the cron script. Instead of getting emailed, cron creates zombie sendmail processes which never die or send the email.

I tested this by manually stopping the services, then waiting 10 minutes for the cron script to run. The cron script runs, and the services start back up, but I never get the email from the output of the cron script. The sendmail process that started from cron freezes up somehow for some reason and becomes a defunct zombie process.

Basically all I want is to be notified with the output of cron. I don't know if this is a cron problem or a sendmail problem.

I actually switched from sendmail to exim4 after making that original post, and it does the same exact thing.