diff options
Diffstat (limited to 'network/openvas-scanner/rc.openvassd')
-rw-r--r-- | network/openvas-scanner/rc.openvassd | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/network/openvas-scanner/rc.openvassd b/network/openvas-scanner/rc.openvassd new file mode 100644 index 000000000000..4be5cc156dac --- /dev/null +++ b/network/openvas-scanner/rc.openvassd @@ -0,0 +1,55 @@ +#!/bin/sh +# +# /etc/rc.d/rc.openvassd +# +# Start/stop/restart/reload the OpenVAS Scanner Daemon. +# +# To make OpenVAS Scanner start automatically at boot, make this +# file executable: chmod 755 /etc/rc.d/rc.openvassd +# and add to rc.local: +# if [ -x /etc/rc.d/rc.openvassd ]; then +# . /etc/rc.d/rc.openvassd start +# fi +# + +OPENVASSD_PATH=/usr/sbin +OPENVASSD_BIN=openvassd +OPENVASSD_OPTIONS="-a 127.0.0.1 --gnutls-priorities=SECURE128:-VERS-SSL3.0" +OPENVASSD_CMD="$OPENVASSD_PATH/$OPENVASSD_BIN $OPENVASSD_OPTIONS" + +openvassd_start() { + echo Starting OpenVAS Scanner: $OPENVASSD_CMD + $OPENVASSD_CMD +} + +openvassd_stop() { + echo "Stopping OpenVAS Scanner" + /bin/killall $OPENVASSD_BIN +} + +openvassd_restart() { + openvassd_stop + sleep 2 + openvassd_start +} + +openvassd_reload() { + /bin/killall -HUP $OPENVASSD_BIN +} + +case "$1" in +'start') + openvassd_start + ;; +'stop') + openvassd_stop + ;; +'restart') + openvassd_restart + ;; +'reload') + openvassd_reload + ;; +*) + echo "usage $0 start|stop|restart|reload" +esac |