summaryrefslogtreecommitdiff
path: root/network/openvas-server/rc.openvasd
blob: e66b4758b70918ff86274965f0dcc207fce0bebe (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/openvasd.pid"

start() {
  echo "Starting OpenVAS server..."
  openvasd -D
}

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

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