<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3492" name=GENERATOR>
<STYLE>@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2>Find something simple (like the syslog startup script) and 
hack it into a xymon startup script.  For the start command, "su - hobbit 
-c <wherever>runclient.sh".</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2>Here is an example that I use:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2>#!/sbin/sh<BR>#<BR>#       
Greg Hubbard, EDS, January 2006<BR>#<BR>#       
Made from Solaris syslog startup script</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2>BBHOME=/app/hobbit/client; export BBHOME<BR>BBUSER=xymon; 
export BBUSER<BR>HOST="`uname -n`.domain.com"</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2>case "$1" 
in<BR>'start')<BR>        if [ -f 
$BBHOME/runclient.sh ]; 
then<BR>                
echo 'Hobbit client 
starting.'<BR>                
#<BR>                
su - $BBUSER -c "cd $BBHOME; ./runclient.sh --hostname=$HOST 
start"<BR>        
fi<BR>        ;;</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2>'stop')<BR>        if [ 
-f $BBHOME/runclient.sh ]; then</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff 
size=2>                
su - $BBUSER -c "cd $BBHOME; ./runclient.sh 
stop"<BR>        
fi<BR>        ;;</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=956540213-05062009><FONT face=Arial 
color=#0000ff size=2>*)<BR>        echo 
"Usage: $0 { start | stop }"<BR>        exit 
1<BR>        
;;<BR>esac<BR></FONT></SPAN></DIV>
<DIV><SPAN class=956540213-05062009><FONT face=Arial color=#0000ff size=2>This 
is for a client.  The server startup is similar, except it runs the server 
startup script.  This is not the most clever or elaborate of scripts, but 
it does work for me.</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR> </DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> David Peters [mailto:davidp@electronf.com] 
<BR><B>Sent:</B> Friday, June 05, 2009 5:09 AM<BR><B>To:</B> 
hobbit@hswn.dk<BR><B>Subject:</B> [hobbit] Hobbit startup 
script.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I understand that hobbit needs to 
run as the hobbit user, but it is a bit annoying to have the hobbit startup 
script require the hobbit user to run it.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">When I want to run it automagically 
out of /etc/init.d I have to change the script to not check for hobbit and then 
do an su to the hobbit user thus:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">su -c 
"/home/xymon/server/bin/hobbitlaunch 
--config=/home/xymon/server/etc/hobbitlaunch.cfg 
--env=/home/xymon/server/etc/hob<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">bitserver.cfg 
--log=/var/log/xymon/hobbitlaunch.log 
--pidfile=/var/log/xymon/hobbitlaunch.pid"<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">why is it done this way rather than 
as above, thus allowing the server to start out of 
init.d?<o:p></o:p></SPAN></FONT></P></DIV></BODY></HTML>