summaryrefslogtreecommitdiff
path: root/network/openvas-administrator/rc.openvasad
diff options
context:
space:
mode:
Diffstat (limited to 'network/openvas-administrator/rc.openvasad')
-rw-r--r--network/openvas-administrator/rc.openvasad32
1 files changed, 32 insertions, 0 deletions
diff --git a/network/openvas-administrator/rc.openvasad b/network/openvas-administrator/rc.openvasad
new file mode 100644
index 0000000000..78f167a47f
--- /dev/null
+++ b/network/openvas-administrator/rc.openvasad
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Get OpenVAS options
+. /etc/rc.d/rc.openvas.conf
+
+PIDFILE="/var/run/openvasad.pid"
+
+start() {
+ echo "Starting OpenVAS administrator..."
+ openvasad --port=${ADM_PORT} ${ADM_OPTIONS}
+}
+
+stop() {
+ echo "Stopping OpenVAS administrator..."
+ kill `cat $PIDFILE`
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ sleep 1
+ start
+ ;;
+ *)
+ echo "Usage: $0 (start|stop|restart)"
+esac