[syslog-ng] Reloading configuration

Evan Rempel erempel at uvic.ca
Fri Nov 24 18:29:57 CET 2006


It depends on where you got your /etc/init.d/syslog-ng script from.
We have written our own, and have a "reload" option that does the kill -HUP
function, so all we have to do now is

/etc/init.d/syslog-ng reload

and you get a reload without doing a restart.
--------------------
reload() {
         echo -n "Reloading system logger: "
         # if no pid file, then not running
         if [ -f $SUBSYS_FILE ]; then
                 killproc syslog-ng -HUP
                 echo
                 RETVAL=$?
         else
                 warning "no running syslog to reload."; echo
                 RETVAL=1
         fi
         return $RETVAL
}
----------
Evan.

Anselmo Lacerda S. de Melo wrote:
> -----Original Message-----
> From: syslog-ng-bounces at lists.balabit.hu on behalf of Wolfram Schlich
> Sent: Fri 24-Nov-06 10:05 AM
> To: syslog-ng at lists.balabit.hu
> Subject: Re: [syslog-ng] Reloading configuration
> 
> * Anselmo Lacerda Silveira de Melo <anselmo.melo at asga.com.br> [2006-11-24 13:02]:
>  > Just a question: Can syslog-ng reload its configuration file (changed)
>  > without being restarted? I couldn't find anything related in the
>  > documentation.
> 
> kill -HUP $(< /var/run/syslog-ng.pid)
> 
> 
> Hi Wolfram,
> 
> Thank you for answering, but what I asked was about a function (from syslog-ng) 
> that does it automaticaly (withou kill, /etc/init.d/syslog restart, etc).
> 
> Anselmo
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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