From 45c99a8b9e55e1ade16ffc7b4370498bc36f6bc6 Mon Sep 17 00:00:00 2001 From: Justin Lecher Date: Wed, 1 Oct 2014 13:03:14 +0000 Subject: net-analyzer/openvas-scanner: Add initial cache generation to init-script Package-Manager: portage-2.2.14_rc1/cvs/Linux x86_64 Manifest-Sign-Key: 0xB9D4F231BD1558AB! --- net-analyzer/openvas-scanner/files/openvassd.init | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'net-analyzer/openvas-scanner/files') diff --git a/net-analyzer/openvas-scanner/files/openvassd.init b/net-analyzer/openvas-scanner/files/openvassd.init index f84dc3b7aa9c..54ebb4820343 100644 --- a/net-analyzer/openvas-scanner/files/openvassd.init +++ b/net-analyzer/openvas-scanner/files/openvassd.init @@ -7,6 +7,7 @@ name="OpenVAS Scanner" command="/usr/sbin/openvassd" command_args="${SCANNER_LISTEN} ${SCANNER_PORT} ${SCANNER_SRCIP} ${SCANNER_EXTRA_ARGS}" pidfile="/run/openvassd.pid" +extra_stopped_commands="create_cache" depend() { after bootmisc @@ -16,3 +17,10 @@ depend() { start_pre() { checkpath --directory --mode 0775 --quiet /var/cache/openvas } + +create_cache() { + checkpath --directory --mode 0775 --quiet /var/cache/openvas + ebegin "Generating initial Cache" + /usr/sbin/openvassd --foreground --only-cache + eend $? +} -- cgit v1.2.3-65-gdbad