PDA

View Full Version : Autostart at boot level


Araman Amru
05-11-2007, 03:52 PM
Hi all

I'm not expert in linux automation.
But would appreciate if somebody can help me on this.

I keep doing this everytime I restart my nagios linux box.

(From Danial Slone's docs)
1) sudo /etc/init.d/nagios stop (stop nagios ... It autostarted when linux boot)
2) rm -f /usr/local/nagios/var/perfdata-service.log
3) sudo -u nagios /usr/local/nagios/bin/perfparsed -d
4) sudo /etc/init.d/nagios start
(from Oreon wiki Graph : Run ODS deamon)
5) /etc/init.d/ods start
(or I have to rm -f ods.pid first)

Anybody can teach how to autostart all this at boot time?

Thanks...
Araman.

WAtt
05-11-2007, 04:07 PM
http://wiki.oreon-project.org/index.php/InstallOdsService ??

Araman Amru
05-11-2007, 04:51 PM
Thanks Watt..

But.. I'm using CentOS...
I've tried all of the steps for ods.. but not all can be applied..

Sorry...

WAtt
05-11-2007, 05:20 PM
Check this link

http://66.102.9.104/search?q=cache:PbdN2CywUq8J:www.mail-archive.com/webware-discuss%40lists.sourceforge.net/msg08431.html+CentOS+init.d+add&hl=en&ct=clnk&cd=7&gl=fr&client=firefox-a

If you resolve this, please write solution on wiki :)

Araman Amru
05-11-2007, 05:47 PM
Will do the search and try to implement it..
I will give the answer as soon as I get it..

Thanks

Rgds
ARaman

DonKiShoot
05-11-2007, 06:47 PM
centos is like redhat, something like "chkconfig --add oreon" should do it ;-)

Araman Amru
05-12-2007, 05:25 PM
Thanks DonKiShoot...

I manage to get ODS to start at boot level..
But if my server crash... ods.pid need to be deleted before ODS can be started.
So, it shows [FAILED] on ODS startup.

Haven't find the way to put "perfparsed -d" at startup yet..
Have to include "rm -f perfdata-service.log" as mentioned in Danial Sloan's doc's.

Thanks..