On Sunday 22 August 2010 11:25:05 Alex Schuster wrote:
> Mick writes:
> > The chrony installed logrotate script keeps erroring out:
> > ========================================================
> > logrotate_script: line 5: warning: here-document at line 2 delimited by
> > end- of-file (wanted `EOF')
> > Unrecognized command
> > ========================================================
> > 
> > This is the script:
> > ========================================================
> > /var/log/chrony/*.log {
> > 
> >     sharedscripts
> >     postrotate
> >     
> >                 PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}'
> > 
> > /etc/chrony/chrony.keys`
> > 
> >                 cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d'
> >                 password $PASSWORD
> >                 cyclelogs
> >                 EOF
> >         
> >         endscript
> > 
> > }
> > ========================================================
> > 
> > I do not understand the error.  Is it telling me to add backticks?
> > Where?
> 
> I don't know the logrotate syntax, but in bash this would not work if the
> ending EOF has leading whitespace. Try replacing the '<<' by '<<-', then
> whitespace is allowed.

Thanks!  I've used your suggestion and will see if the error goes away.
-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to