<FONT face="Vorgabe Sans Serif,Verdana,Arial,Helvetica,Sans-serif" size=2><div><div><font color="#990099">Danny,<br><br>you have the same start section as it is on my system. <br>If you look a little bit further in the file you find this section<br><br>prefix=/usr<br>exec_prefix=/usr<br>NagiosBin=/usr/bin/nagios<br>NagiosCfgFile=/etc/nagios/nagios.cfg<br>NagiosStatusFile=/var/log/nagios/status.dat<br>NagiosTempFile=/var/log/nagios/nagios.tmp<br>NagiosRetentionFile=/var/log/nagios/retention.dat<br>NagiosCommandFile=/var/log/nagios/rw/nagios.cmd<br>NagiosVarDir=/var/log/nagios<br>NagiosRunFile=/var/run/nagios.pid<br>NagiosLockDir=/var/lock/subsys<br>NagiosLockFile=nagios<br>NagiosCGIDir=/usr/lib/nagios/cgi<br>NagiosUser=nagios<br>NagiosGroup=nagios<br><br># added by thorsten<br><br>HOME=/var/log/nagios<br><br>This solves the problem of the /home problem, so I before other people are running in the same problem it is better to add it in the distritbution.<br><br>I am using Nagios 2.5 rpm for RH ES 3, updated to 2.7 with an rpm build by my own.<br><br>Thorsten<br><br><br></font><blockquote style="border-left: 2px solid #000000; padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">An: TKocher@spirit21.de<br>Von: Daniel Meyer <eagle@cyberdelia.de><br>Datum: 26.01.2007 08:45AM<br>Kopie: nagios-users@lists.sourceforge.net<br>Thema: Re: [Nagios-users] Antwort: Re: $HOME is not set in init script<br><br><font face="monospace" size="3">On Thu, 25 Jan 2007, TKocher@spirit21.de wrote:<br><br>> Daniel,<br>> <br>> nagios is started in /etc/init.d/nagios with "su - nagios -c nagios", so the process<br>> inherits the environment varialbes of the root user, which executes the su command.<br>> ($HOME is /root)<br><br>Which distribution are you using? My init-script (based on the one from <br>Dag Wieers Nagios-RPM) starts nagios this way:<br><br>case "$1" in<br><br> start)<br> echo "Starting network monitor: nagios"<br> $NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;<br> if [ $? -eq 0 ]; then<br> su - $NagiosUser -c "/usr/bin/ndo2db -c <br>/etc/nagios/ndo2db.cfg"<br> su - $NagiosUser -c "touch <br>$NagiosVarDir/nagios.log $NagiosRetentionFile"<br> rm -f $NagiosCommandFile<br> touch $NagiosRunFile<br> chown $NagiosUser:$NagiosGroup $NagiosRunFile<br> $NagiosBin -d $NagiosCfgFile<br><br><br><br>Danny<br>-- <br>Q: Gentoo is too hard to install = <a href="http://www.cyberdelia.de">http://www.cyberdelia.de</a><br> and I feel like whining. = eagle@cyberdelia.de<br>A: Please see /dev/null. =<br> (from the gentoo installer FAQ) = \o/<br></font>
</blockquote><br></div></div></FONT>