#!/bin/sh # # tac_plus Tacacs+ server # # chkconfig: 345 15 85 # description: Cisco's tacacs+ access, authorization, and accounting server. # processname: tac_plus # config: /etc/tac_plus.conf # pidfile: /var/run/tac_plus.pid # Do not load RH compatibility interface. WITHOUT_RC_COMPAT=1 # Source function library. . /etc/init.d/functions # Source networking configuration. SourceIfNotEmpty /etc/sysconfig/network is_yes "$NETWORKING" || return 0 CONFIG=/etc/tac_plus.conf SourceIfNotEmpty /etc/sysconfig/tac_plus PIDFILE=/var/run/tac_plus.pid LOCKFILE=/var/lock/subsys/tac_plus RETVAL=0 start() { start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- tac_plus -C $CONFIG $TACPLUS_ARGS RETVAL=$? return $RETVAL } stop() { stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- tac_plus RETVAL=$? return $RETVAL } restart() { stop start } reload() { tac_plus -P -C $CONFIG >/dev/null || action "Configuration check:" false || exit 255 msg_reloading tac_plus stop_daemon --pidfile "$PIDFILE" --expect-user root -HUP -- tac_plus RETVAL=$? return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; reload) reload ;; restart) restart ;; condstop) if [ -e "$LOCKFILE" ]; then stop fi ;; condrestart) if [ -e "$LOCKFILE" ]; then restart fi ;; condreload) if [ -e "$LOCKFILE" ]; then reload fi ;; status) status --pidfile "$PIDFILE" --expect-user root -- tac_plus RETVAL=$? ;; *) msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" RETVAL=1 esac exit $RETVAL