aboutsummaryrefslogtreecommitdiff
path: root/network/openvas-manager/rc.openvasmd
blob: 78595eea780c1423ed4daf48d0bc562300b0aa37 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh
#
# /etc/rc.d/rc.openvasmd
#
# Start/stop/restart the OpenVAS Manager Daemon.
#
# To make OpenVAS Manager start automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.openvasmd
# and add to rc.local:
# if [ -x /etc/rc.d/rc.openvasmd ]; then
#   . /etc/rc.d/rc.openvasmd start
# fi
#

OPENVASMD_PATH=/usr/sbin
OPENVASMD_BIN=openvasmd
OPENVASMD_OPTIONS="-a 127.0.0.1 --gnutls-priorities=SECURE128:-VERS-SSL3.0"
OPENVASMD_CMD="$OPENVASMD_PATH/$OPENVASMD_BIN $OPENVASMD_OPTIONS"

openvasmd_start() {
  echo Starting OpenVAS Manager: $OPENVASMD_CMD
  $OPENVASMD_CMD
}

openvasmd_stop() {
  echo "Stopping OpenVAS Manager"
  /bin/killall $OPENVASMD_BIN
}

openvasmd_restart() {
  openvasmd_stop
  openvasmd_start
}

case "$1" in
'start')
  openvasmd_start
  ;;
'stop')
  openvasmd_stop
  ;;
'restart')
  openvasmd_restart
  ;;
*)
  echo "usage $0 start|stop|restart|reload"
esac