mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
32 lines
427 B
Bash
32 lines
427 B
Bash
#!/bin/sh
|
|
|
|
# Get OpenVAS options
|
|
. /etc/rc.d/rc.openvas.conf
|
|
|
|
PIDFILE="/var/run/openvassd.pid"
|
|
|
|
start() {
|
|
echo "Starting OpenVAS scanner..."
|
|
openvassd --port=${SCA_PORT} ${SCA_OPTIONS}
|
|
}
|
|
|
|
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
|