summaryrefslogtreecommitdiff
path: root/network/openvas-scanner/rc.openvassd
blob: 4ae0183ccea1896ffa125d08d4905ab2bd262dda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

PIDFILE="/var/run/openvassd.pid"

start() {
  echo "Starting OpenVAS scanner..."
  openvassd
}

stop() {
  echo "Stopping OpenVAS scanner..."
  kill `cat $PIDFILE`
}

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    sleep 1
    start
    ;;
  *)
    echo "Usage: $0 (start|stop|restart)"
esac