So I was checking my logrotate config for httpd, and, in the section
postrotate ... endscript it has the following:
/sbin/service httpd reload > /dev/null 2>/dev/null || true
I understand the first one, if there is output, send it to /dev/null, but why the second entry?
I checked and a
2> means stderr to file. So, if I understand correctly, the first entry tells the script to send
stdout to /dev/null and the second,
stderr to /dev/null, is this correct?
As for the
|| true, why is it there?
&> means both
stdout and stderr, can I replace both entries and just specify one time the following:
/sbin/service httpd reload &> /dev/null ?