[syslog-ng] AIX startup

Nathan Campi nate at campin.net
Wed Oct 25 19:47:15 CEST 2006


I had this all ready to go:

 #!/bin/sh
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 if [ -f /var/run/syslog-ng.pid ]
 then
         # make sure the PID in the pidfile is actually running and is
         # syslog-ng, not something else
         if ps -ef|grep " `cat /var/run/syslog-ng.pid ` " | grep -v grep | grep syslog-ng  >/dev/null 
         then 
                 echo "already have a syslog-ng daemon running, killing it now"
                 kill `cat /var/run/syslog-ng.pid `
         fi
 fi
 
 exec /sbin/syslog-ng -F

...then I realized that syslog-ng doesn't update /var/run/syslog-ng.pid
when running in the foreground. The sshd from openssh does, so I have
logic like the above in my ssh run script called from daemontools. I
suppose you'll just have to call pkill before the exec of syslog-ng. :(

On Wed, Oct 25, 2006 at 10:55:30AM -0500, Brian Loe wrote:
> Got a sample rc script?
> 
> On 10/25/06, Nathan Campi <nate at campin.net> wrote:
> 
> >
> >Workable solution is to still have an rc script that starts syslog and
> >have the daemontools run script kill off any already running syslog-ng
> >daemons when it comes up later. Might be overkill to supervise it in the
> >first place - judgement call I suppose.
> >
> >--
> >Nate Campi
> _______________________________________________
> syslog-ng maillist  -  syslog-ng at lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
> 

-- 
Nate

"UNIX is an operating system, OS/2 is half an operating system, Windows
is a shell, and DOS is a boot partition virus."    - Peter H. Coffin . 



More information about the syslog-ng mailing list