Trying to get sa-update to write to a file which logwatch will include in its report.
/etc/cron.daily/sa_update:
/etc/cron.daily/sa_update: line 4: syntax error near unexpected token `2'
/etc/cron.daily/sa_update: line 4: `&& /sbin/service spamassassin restart > 2>&1 tee -a /var/log/sa-update.log'
what is wrong with my script ??
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Still not working after checking for blank lines, here is the actual code I'm using:
[root@gz cron.daily]# more sa_update
This produced the orphan message.
[root@gz cron.daily]# more sa_update
Code: Select all
/usr/bin/sa-update --allowplugins \
--channel updates.spamassassin.org \
--gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel saupdates.openprotect.com, \
&& /sbin/service spamassassin restart > /dev/null 2>&1 tee -a /var/log/sa-update.log
[root@gz cron.daily]#
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Ok, guess the script is working...
After researching more on the web about the reporting functionality of sa-update I have come to the conclusion that it won't generate a report unless the -D flag is added?
Is this a true statement and therefore my sa-update.log won't be populated unless I enable that in the cron? I think I read that there is a bug on this but can't be sure.
Thanks.
After researching more on the web about the reporting functionality of sa-update I have come to the conclusion that it won't generate a report unless the -D flag is added?
Is this a true statement and therefore my sa-update.log won't be populated unless I enable that in the cron? I think I read that there is a bug on this but can't be sure.
Thanks.