[syslog-ng] AIX startup

Evan Rempel erempel at uvic.ca
Wed Oct 25 20:44:06 CEST 2006


Nathan Campi wrote:
> 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. :(

Or when running in the foreground, make the PID file from the script, rather than syslog-ng doing it.

Evan.


> 
> 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
>>
> 


-- 
Evan Rempel                erempel at uvic.ca
Senior Programmer Analyst        250.721.7691
Computing Services
University of Victoria


More information about the syslog-ng mailing list