$HOME is not set in init script

Marc Powell marc at ena.com
Thu Jan 25 15:55:22 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of TKocher at spirit21.de
> Sent: Thursday, January 25, 2007 3:43 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] $HOME is not set in init script
> 
> Hi all,
> 
> I was writing an event-handler which does ssh to the faulty box. It
does
> not work at all, since $HOME was /root and not /var/log. ssh aborted
since
> it could not read /root/.ssh/known_hosts.

FWIW, I don't see this with my event handlers. All run as nagios and use
~nagios/.ssh/known_hosts when called in my event handler like --

ssh $4 'sudo /etc/init.d/winbind restart ' >>$LOGFILE 2>&1

--
Marc

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list