summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHasan ÇALIŞIR <hasan.calisir@psauxit.com>2019-08-12 18:01:24 +0300
committerJoonas Niilola <juippis@gentoo.org>2019-10-28 06:01:56 +0200
commit0a333bcfaacbad0dad5757cb0de488b952d694cc (patch)
tree55eac5209fc3a7c22305372d5053b1dbd154023b /net-analyzer/openvas-scanner/files/gvm-feed-sync.sh
parentnet-analyzer/gvm-libs: new package. (diff)
downloadgentoo-0a333bcfaacbad0dad5757cb0de488b952d694cc.tar.gz
gentoo-0a333bcfaacbad0dad5757cb0de488b952d694cc.tar.bz2
gentoo-0a333bcfaacbad0dad5757cb0de488b952d694cc.zip
net-analyzer/openvas-scanner: bump to 6.0.1 & update metadata.
Bump to 6.0.1. Update metadata. This also fixes bug 684220 and introduces the new USE flag 'cron'. Closes: https://bugs.gentoo.org/684220 Reported-by: aleck <rickrick@stachelkaktus.net> Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Hasan ÇALIŞIR <hasan.calisir@psauxit.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-analyzer/openvas-scanner/files/gvm-feed-sync.sh')
-rw-r--r--net-analyzer/openvas-scanner/files/gvm-feed-sync.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh b/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh
new file mode 100644
index 000000000000..ba21632a4d6c
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Copyright 1999-2019 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-nvt-sync --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-scapdata-sync &>/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-certdata-sync &>/dev/null && break
+ try=$[$try+1]
+ sleep 30
+ done
+
+ # Check status
+ if [ $? -eq 0 ]; then
+ exit 0
+ else
+ exit 1
+ fi
+ fi
+fi