Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
tacacs+
> tac_plus.init.rh
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File tac_plus.init.rh of Package tacacs+ (Revision 11)
Currently displaying revision
11
,
show latest
#!/bin/bash # # /etc/rc.d/init.d/tac_plus # # chkconfig: 2345 86 14 # description: TACACS+ Daemon # Define variables TACPLUS_PID=/var/run/tac_plus.pid TACPLUS_EXE=/usr/bin/tac_plus TACPLUS_ARG="" TACPLUS_CNF=/etc/tac_plus.conf # Source function library. . /etc/rc.d/init.d/functions case "$1" in start) # Check to see if tac_plus is running. if [[ -f ${TACPLUS_PID} || -f /var/lock/subsys/tac_plus ]]; then echo "tac_plus may already be running. Check for existing tac_plus processes." exit 1 fi echo -n "Starting tac_plus:" $TACPLUS_EXE $TACPLUS_ARG -C $TACPLUS_CNF && success || failure echo touch /var/lock/subsys/tac_plus ;; stop) if [[ -f ${TACPLUS_PID} && -f /var/lock/subsys/tac_plus ]]; then echo -n "Stopping tac_plus:" killproc -p ${TACPLUS_PID} echo rm -f /var/lock/subsys/tac_plus rm -f ${TACPLUS_PID} else echo "tac_plus does not appear to be running." fi ;; status) if [[ -f ${TACPLUS_PID} && -f /var/lock/subsys/tac_plus ]]; then echo "tac_plus pid is `cat ${TACPLUS_PID}`" else echo "tac_plus does not appear to be running." fi ;; restart) $0 stop; $0 start ;; reload) echo -n "Reloading tac_plus..." if [[ -f ${TACPLUS_PID} && -f /var/lock/subsys/tac_plus ]]; then kill -HUP `cat ${TACPLUS_PID}` RETVAL=$? fi if [ $RETVAL -ne 0 ]; then failure else success fi echo ;; *) echo "Usage: $0 {start|stop|status|reload|restart}" exit 1 ;; esac