summaryrefslogblamecommitdiffstats
path: root/network/greenbone-security-assistant/rc.gsad
blob: d97a5ba2f6782360ec73af04ab26307511c378e1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                 
                      
















                                         
#!/bin/sh

# Get OpenVAS options
. /etc/rc.d/rc.openvas.conf

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

start() {
  echo "Starting Greenbone Security Assistant..."
  gsad --mport=${MAN_PORT} ${GSA_OPTIONS}
}

stop() {
  echo "Stopping Greenbone Security Assistant..."
  kill $(cat $PIDFILE)
}

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