summaryrefslogtreecommitdiff
path: root/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron')
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron39
1 files changed, 0 insertions, 39 deletions
diff --git a/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron b/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron
deleted file mode 100644
index e6a83867f3d9..000000000000
--- a/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-if [ -f /etc/openvas/openvassd.conf ]; then
- . /etc/openvas/openvassd.conf
-fi
-
-if [ "$auto_plugin_update" != "yes" ]; then
- exit 0
-fi
-
-opts=""
-case "$update_method" in
- rsync)
- opts = "$opts --rsync"
- ;;
- wget)
- opts = "$opts --wget"
- ;;
- curl)
- opts = "$opts --curl"
- ;;
-esac
-
-# Export openvas-nvt-sync's environment variables if they are defined
-[ \! -z "$NVT_DIR" ] && export NVT_DIR
-[ \! -z "$OV_RSYNC_FEED" ] && export OV_RSYNC_FEED
-[ \! -z "$OV_HTTP_FEED" ] && export OV_HTTP_FEED
-
-/usr/sbin/openvas-nvt-sync $opts >& /dev/null
-
-if [ $? -ne 0 ]; then
- echo "Error updating OpenVAS plugins. Please run openvas-nvt-sync manually."
- exit 1
-fi
-
-if [ "$notify_openvas_scanner" == "yes" ]; then
- /etc/init.d/openvas-scanner reloadplugins
-fi
-