summaryrefslogtreecommitdiff
path: root/network/openvas-manager/rc.openvasmd
diff options
context:
space:
mode:
authorMarco Bonetti <sid77@slackware.it>2010-04-12 19:34:18 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-15 10:37:52 +0200
commite9a7006cde1ba891e7892d1ff12b25b2cadb8d29 (patch)
tree27adc42d85ce65b6ba5a348c53c5369f1663666d /network/openvas-manager/rc.openvasmd
parent4bf50e435b46175be516675339fad4e86fdf7e5c (diff)
downloadslackbuilds-e9a7006cde1ba891e7892d1ff12b25b2cadb8d29.tar.gz
network/openvas-manager: Added (OpenVAS scan manager)
Diffstat (limited to 'network/openvas-manager/rc.openvasmd')
-rw-r--r--network/openvas-manager/rc.openvasmd53
1 files changed, 53 insertions, 0 deletions
diff --git a/network/openvas-manager/rc.openvasmd b/network/openvas-manager/rc.openvasmd
new file mode 100644
index 0000000000..0a89f4e1b7
--- /dev/null
+++ b/network/openvas-manager/rc.openvasmd
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Get OpenVAS options
+. /etc/rc.d/rc.openvas.conf
+
+PIDFILE="/var/run/openvasmd.pid"
+
+start() {
+ echo "Starting OpenVAS manager..."
+ openvasmd --port=${MAN_PORT} --sport=${SCA_PORT} ${MAN_OPTIONS}
+}
+
+stop() {
+ echo "Stopping OpenVAS manager..."
+ kill `cat $PIDFILE`
+}
+
+update() {
+ openvasmd --sport=${SCA_PORT} --update
+}
+
+rebuild() {
+ openvasmd --sport=${SCA_PORT} --rebuild
+}
+
+migrate() {
+ openvasmd --sport=${SCA_PORT} --migrate
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ sleep 1
+ start
+ ;;
+ update)
+ update
+ ;;
+ rebuild)
+ rebuild
+ ;;
+ migrate)
+ migrate
+ ;;
+ *)
+ echo "Usage: $0 (start|stop|restart|update|rebuild|migrate)"
+esac