1 |
Put something like this in [f]crontab: |
2 |
|
3 |
%daily,lavg(1.5,2,2) * 3-9 root rsync --recursive --links --safe-links |
4 |
--perms --times --compress --force --whole-file --delete --delete-after |
5 |
--stats --timeout=180 |
6 |
rsync://rsync.gentoo.org/gentoo-portage/metadata/glsa/* /usr/portage/metadata/glsa/ ;glsa-check -n -l|grep "\[N";glsa-check -t all |
7 |
|
8 |
glsa-check only does its magic on the current portage snapshot - the |
9 |
above line rsyncs just the security stuff first. Once done, get cron to |
10 |
mail it as here. |
11 |
|
12 |
BillK |
13 |
|
14 |
|
15 |
On Mon, 2008-06-09 at 19:59 -0700, JD Gray wrote: |
16 |
> I'm running the below script on my gentoo servers to email me whenever |
17 |
> there are GLSA's affecting me. It works like a charm, but I have one |
18 |
> beef with it. Newlines are not preserved, so I get a lovely Wall Of |
19 |
> Text (tm) when ever it sends me the GLSA. I'm guessing this is because |
20 |
> of the way bash handles variables. Anyone have any insight on how to |
21 |
> correct this? |
22 |
> |
23 |
> #!/bin/bash |
24 |
> |
25 |
> /usr/bin/glsa-check -t all &> /dev/null |
26 |
> CHECK_RESULT="`/usr/bin/glsa-check -t all 2>&1`" |
27 |
> |
28 |
> if [ "$CHECK_RESULT" != "" ]; then |
29 |
> echo $CHECK_RESULT | /bin/mail -s "Frog glsa-check" kahdgarxi@×××××.com; |
30 |
> fi |
31 |
> |
32 |
> Thanks in advance |
33 |
> |
34 |
> -JD |
35 |
-- |
36 |
gentoo-server@l.g.o mailing list |