RE: [syslog-ng] Reloading configuration
Anselmo, *please* fix your MUA, its quote function is broken and it sends HTML mails. * Anselmo Lacerda S. de Melo <Anselmo.Melo@asga.com.br> [2006-11-24 13:14]:
* Wolfram Schlich
* Anselmo Lacerda Silveira de Melo <anselmo.melo@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).
Why should it reload it automactially?! I don't think automatically reloading changed configuration is a smart idea. You might have broken something when editing syslog-ng.conf. The standard procedure should be: 1. edit and save syslog-ng.conf 2. check for syntax errors with "syslog-ng -s" 3. reload syslog-ng (kill -HUP) to make it re-initialize its config. The Gentoo init script for syslog-ng for example does "syslog-ng -s" automatically before (re)starting syslog-ng. It also supports a "reload" option that does the "kill -HUP" stuff. Regards -- Wolfram Schlich
Em Sex, 2006-11-24 às 13:33 +0100, Wolfram Schlich escreveu:
Anselmo,
*please* fix your MUA, its quote function is broken and it sends HTML mails.
Sorry, I had problems with evolution and the last e-mail was sent using the webmail interface.
* Anselmo Lacerda S. de Melo <Anselmo.Melo@asga.com.br> [2006-11-24 13:14]:
* Wolfram Schlich
* Anselmo Lacerda Silveira de Melo <anselmo.melo@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).
Why should it reload it automactially?!
I didn't say it should. It was just a question!
I don't think automatically reloading changed configuration is a smart idea. You might have broken something when editing syslog-ng.conf.
The standard procedure should be: 1. edit and save syslog-ng.conf 2. check for syntax errors with "syslog-ng -s" 3. reload syslog-ng (kill -HUP) to make it re-initialize its config.
The Gentoo init script for syslog-ng for example does "syslog-ng -s" automatically before (re)starting syslog-ng. It also supports a "reload" option that does the "kill -HUP" stuff.
I know the procedure, the point was the fact that someone here in my job asked me to check this to decide how it will be done in our project. Now it's clear that the known procedure is the way we'll use. thank you.
Regards
Anselmo
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@lists.balabit.hu on behalf of Wolfram Schlich Sent: Fri 24-Nov-06 10:05 AM To: syslog-ng@lists.balabit.hu Subject: Re: [syslog-ng] Reloading configuration
* Anselmo Lacerda Silveira de Melo <anselmo.melo@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@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@uvic.ca Senior Programmer Analyst 250.721.7691 Computing Services University of Victoria
participants (4)
-
Anselmo Lacerda S. de Melo
-
Anselmo Lacerda Silveira de Melo
-
Evan Rempel
-
Wolfram Schlich