Project

General

Profile

Actions

Bug #31

closed

Fix cronolog script on Debian

Added by Florian Effenberger over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
2013-11-23
Due date:
2014-02-11
% Done:

0%

Tags:
Salt

Description

Error message:
/etc/cron.daily/9999cronolog:
/etc/cron.daily/9999cronolog: line 2: syntax error near unexpected token `('
/etc/cron.daily/9999cronolog: line 2: `ls -1 /var/log/apache2/*/*/*/*.log | grep -v \$(date "+%Y%m%d") | xargs --no-run-if-empty bzip2'
run-parts: /etc/cron.daily/9999cronolog exited with return code 2
/etc/cron.daily/9999zombie:
/etc/cron.daily/9999zombie: line 2: /usr/bin/landscape-sysinfo: No such file or directory

Docu snippet:
cat > /etc/cron.daily/9999cronolog << "EOF"
#!/bin/bash
find /var/log/apache2 -mindepth 3 -type f -name \*log ! -name \*$(date "+%Y%m%d")\* -print0 | xargs -0 --no-run-if-empty bzip2
EOF

Actions

Also available in: Atom PDF