Getting email from cron when script is run manually

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



We have some third party software running on a CentOS 4.5 virtual
machine. The software is delivered as compiled python and I wrote an
init script for it myself (/etc/init.d/gk). Because the software lacks
the usual robustness of CentOS services, I have a bash script
(/etc/cron.daily/gk-restart) which simply calls "/etc/init.d/gk
restart". So, as expected, root gets an email every day when cron runs
the script.

Here's the puzzling part: If I need to manually restart the service, I
will use the command "/etc/init.d/gk restart". But then I get the very
same email message from the cron daemon as if the daily cron job had
been run automatically. The email is timestamped for the time at which
I manually restarted the service. How on earth is the manual restart
being monitored by the cron daemon?

The init script is full featured and maintains pid and lock files in
/var/run and /var/lock/subsys respectively. Is that the connection?

Jeff
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux