Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
tac_plus
> tac_plus.init.suse
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File tac_plus.init.suse of Package tac_plus
#!/bin/sh # # tac_plus This shell script takes care of starting and stopping # tac_plus (TACACS+ daemon). # # /etc/init.d/tac_plus # # and symbolic its link # # /usr/sbin/rctac_plus # ### BEGIN INIT INFO # Provides: tac_plus # Required-Start: $network $remote_fs # Required-Stop: $network $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: Start the TACACS+ daemon ### END INIT INFO TACPLUS_BIN=/usr/sbin/tac_plus test -x $TACPLUS_BIN || exit 5 TACPLUS_SYSCONFIG=/etc/sysconfig/tac_plus test -r $TACPLUS_SYSCONFIG || exit 6 . $TACPLUS_SYSCONFIG test -r $TACPLUS_CONFIG || exit 7 . $TACPLUS_CONFIG TACPLUS_PIDFILE=/var/run/tac_plus.pid . /etc/rc.status # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status # First reset status of this service rc_reset # See how we were called. case "$1" in start) # Start daemon. echo -n "Starting tac_plus daemon" startproc -f -p $TACPLUS_PIDFILE $TACPLUS_BIN $TACPLUS_OPTS rc_status -v ;; stop) # Stop daemons. echo -n "Shutting down tac_plus daemon " killproc -p $TACPLUS_PIDFILE -TERM $TACPLUS_BIN echo ;; status) # Status echo -n "Checking for service tac_plus " checkproc -p $TACPLUS_PIDFILE $TACPLUS_BIN rc_status -v ;; restart) $0 stop $0 start rc_status ;; reload) echo -n "Reload service tac_plus " killproc -p $TACPLUS_PIDFILE -SIGUSR1 $TACPLUS_BIN rc_status -v ;; test) echo "Testing config of service tac_plus " $TACPLUS_BIN -P -C $TACPLUS_CONFIG rc_status -v ;; *) echo "Usage: tac_plus {start|stop|status|restart|reload|test}" exit 1 esac exit 0