Mailing List
Home
Linux - General Red Hat Linux discussion list
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Installation - Getting started with Red Hat Linux
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 8.0 - Discussion of Red Hat Linux 8.0 (Psyche)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.1 - Discussion of Red Hat Linux 7.1 (Seawolf)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
sendmail service

sendmail service

2004-02-06       - By Muhammad Rizwan Khan

 Back
Reply:     1     2     3     4  


I got this script and modified a little as my requiremnet. This is very help
full and running fine with me, if any body need it for securing his service.

First edit crontab by following command:
#crontab -e
and add following line in crontab:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /root/send.sh

copy this script in /root/send.sh
#!/bin/sh
# see if the service if running
COUNT=`ps waux |grep -v grep|grep -c sendmail`
# if the service if running quit
if [ $COUNT != 0 ]
then
echo $COUNT " is o.k. exiting... "
# if the service is not running...
else
echo "sendmail is down on server... Restarting.... "
# politely stop and start the service
/etc/rc.d/init.d/sendmail restart
# e-page someone so they will know there was a problem
cat /root/problem.msg |mail -s "sendmail down on your system "
ur_name@(protected)
fi



On Saturday 07 February 2004 18:32, Muhammad Rizwan Khan wrote:
> Hello list!
>
> How i can assure that sendmail is running on my system, and if any time it
> fails it should restart automatically.
>
> If i add some bash script in crond, that it 'll check the status of
> sendmail after every 5 minutes and 'll restart it, if its not running.
> Is there can be any problem with this idea.
> (any body have kind of script)

--

Muhammad Rizwan Khan
http://nixpanel.com
MSN ID: nixpanel@(protected)


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list