blob: 178f49eb049308dcbb736ba95b3867106c668176 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/sh
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# GVM cron script that updates feed.
# Start to update FEED & First NVT.
try=0
until [ $try -ge 5 ]; do
greenbone-feed-sync --type GVMD_DATA --curl &>/dev/null && break
try=$[$try+1]
sleep 30
done
# Check status
if [ $? -eq 0 ]; then
# Avoid your IP temporary banned because of multiple connection
sleep 5
# Try to update scapdata.
try=0
until [ $try -ge 5 ]; do
greenbone-feed-sync --type SCAP &>/dev/null && break
try=$[$try+1]
sleep 30
done
# Check status
if [ $? -eq 0 ]; then
# Avoid your IP temporary banned because of multiple connection
sleep 5
# Try to update certdata
try=0
until [ $try -ge 5 ]; do
greenbone-feed-sync --type CERT &>/dev/null && break
try=$[$try+1]
sleep 30
done
# Check status
if [ $? -eq 0 ]; then
exit 0
else
exit 1
fi
fi
fi
|