Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
openvas-administrator
openvasad.init.fedora
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openvasad.init.fedora of Package openvas-administrator
#!/bin/sh # # openvas-administrator This starts and stops the OpenVAS Administrator. # # chkconfig: 35 75 25 # description: This starts and stops the OpenVAS Administrator. # processname: /usr/sbin/openvasad # config: /etc/openvas/openvasad.conf # pidfile: /var/run/openvasad.pid # ### BEGIN INIT INFO # Provides: $openvas-administrator ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions EXEC="/usr/sbin/openvasad" PROG=$(basename $EXEC) # Check for missing binaries (stale symlinks should not happen) # Note: Special treatment of stop for LSB conformance test -x $EXEC || { echo "$EXEC not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } # Check for existence of needed config file OPENVASAD_CONFIG=/etc/sysconfig/openvas-administrator test -r $OPENVASAD_CONFIG || { echo "$OPENVASAD_CONFIG not existing"; if [ "$1" = "stop" ]; then exit 0; else exit 6; fi; } # Read config . $OPENVASAD_CONFIG [ "ADMINISTRATOR_ADDRESS" ] && PARAMS="--listen="$ADMINISTRATOR_ADDRESS [ "ADMINISTRATOR_PORT" ] && PARAMS="$PARAMS --port="$ADMINISTRATOR_PORT [ "USER_DATA" ] && PARAMS="$PARAMS --users-dir="$USER_DATA [ "SCANNER_CONFIG" ] && PARAMS="$PARAMS --scanner-config-file="$SCANNER_CONFIG [ "SYNC_SCRIPT" ] && PARAMS="$PARAMS --sync-script="$SYNC_SCRIPT LOCKFILE=/var/lock/subsys/$PROG start() { echo -n $"Starting openvas-administrator: " daemon $EXEC $PARAMS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $LOCKFILE return $RETVAL } stop() { echo -n $"Stopping openvas-administrator: " killproc $PROG RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $LOCKFILE return $RETVAL } restart() { stop start } #reload() { # echo -n $"Reloading openvasad.conf file: " # killproc $PROG -HUP # RETVAL=$? # echo # return $RETVAL #} force_reload() { restart } fdr_status() { status $PROG } case "$1" in #start|stop|restart|reload) start|stop|restart) $1 ;; force-reload) force_reload ;; status) fdr_status ;; condrestart|try-restart) [ ! -f $LOCKFILE ] || restart ;; *) #echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}" exit 2 esac
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor