On Tue, 08 Mar 2016 16:25:06 +0000 "Lennart Weller"  wrote:
> March 8 2016 1:52 PM, "Sergey Vojtovich"  wrote:
> > I adjusted your patch a bit, it seem to work well for me. Could you please
> > verify if you're fine with the attached version and it works for you too?
>
> Well you basically dropped all the safe guards. But in the end its a 
> logrotate script.
> Most people will never have the problem in the first place or know whatwent 
> wrong on
> their end when they see your version of the script. So yeah fine with me.

For the record: this patched script fails on my Debian Jessie. For whatever 
reason, 'my_print_defaults' returns two 'pid-file' lines, so the 'if' statement 
chokes, 'flush-logs' doesn't run, and cron emails me an "unexpected operator" 
error. My workaround was to change the grep parameters to ensure only one 
'pid-file' line is returned.
e.g.
 grep -oPm1 ...

Reply via email to