[CentOS] logrotate.d - reload vs restart

Mon Dec 27 21:57:39 UTC 2010
Bill Campbell <centos at celestial.com>

On Mon, Dec 27, 2010, Frank Cox wrote:
>On Mon, 27 Dec 2010 16:31:29 -0500
>Nico Kadel-Garcia wrote:
>
>> */sbin/service* is working fine. It's just a shell script that finds
>> and passes arguments to the init scripts in /etc/rc.d/init.d/.
>> (/etc/init.d is a symlink to /etc/rc.d/init.d: don't be confused by
>> that.)
>> 
>> If the init script supports reload, then service will successfully
>> pass the argument to it. If it doesn't support reload, such as the
>> "privoxy" script in this case does not, then you'll need  to use
>> start, stop, or restart.
>
>Ah... gotcha!  I've learned something today....

There are many options to logrotate that control this, and things
like creating a new log file before reloading or restarting the
service (e.g. at least some syslogd programs will not work unless
their output log file(s) exist when they start.

The GNU shtool also provides log rotate functions which can be
used in cron jobs and such.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

When the customer has beaten upon you long enough, give him what he asks
for, instead of what he needs.  This is very strong medicine, and is
normally only required once.
    -- The Consultant's Curse: