Merge "Redirect fuel-logrotate's pgrep output to /dev/null"
This commit is contained in:
commit
938f033a5d
|
@ -4,7 +4,7 @@
|
|||
# Due to bug in logrotate, it always returns 0. Use grep for detect errors;
|
||||
# exit code 1 is considered a success as no errors were found.
|
||||
|
||||
if ! pgrep -x logrotate &>/dev/null; then
|
||||
if ! pgrep -x logrotate >/dev/null 2>&1; then
|
||||
nice ionice -c3 /usr/sbin/logrotate /etc/logrotate.d/fuel.nodaily >& /tmp/logrotate
|
||||
grep -q error /tmp/logrotate
|
||||
EXITVALUE=$?
|
||||
|
|
|
@ -11,7 +11,7 @@ done >> status.clean
|
|||
mv status.clean status
|
||||
test -x /usr/sbin/logrotate || exit 0
|
||||
|
||||
if ! pgrep -x logrotate &>/dev/null; then
|
||||
if ! pgrep -x logrotate >/dev/null 2>&1; then
|
||||
nice ionice -c3 /usr/sbin/logrotate /etc/logrotate.d/fuel.nodaily
|
||||
EXITVALUE=$?
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue