mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
2024922574
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
47 lines
826 B
Bash
47 lines
826 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/rc.gsad
|
|
#
|
|
# Start/stop/restart the Greenbone Security Assistant Daemon.
|
|
#
|
|
# To make Greenbone SA start automatically at boot, make this
|
|
# file executable: chmod 755 /etc/rc.d/rc.gsad
|
|
# and add to rc.local:
|
|
# if [ -x /etc/rc.d/rc.gsad ]; then
|
|
# . /etc/rc.d/rc.gsad start
|
|
# fi
|
|
#
|
|
|
|
GSAD_PATH=/usr/sbin
|
|
GSAD_BIN=gsad
|
|
GSAD_OPTIONS="-p 9392 --timeout=60 --gnutls-priorities=SECURE128:-VERS-SSL3.0"
|
|
GSAD_CMD="$GSAD_PATH/$GSAD_BIN $GSAD_OPTIONS"
|
|
|
|
gsad_start() {
|
|
echo Starting Greenbone Security Assistant: $GSAD_CMD
|
|
$GSAD_CMD
|
|
}
|
|
|
|
gsad_stop() {
|
|
echo "Stopping Greenbone Security Assistant"
|
|
/bin/killall $GSAD_BIN
|
|
}
|
|
|
|
gsad_restart() {
|
|
gsad_stop
|
|
gsad_start
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
gsad_start
|
|
;;
|
|
'stop')
|
|
gsad_stop
|
|
;;
|
|
'restart')
|
|
gsad_restart
|
|
;;
|
|
*)
|
|
echo "usage $0 start|stop|restart"
|
|
esac
|