Pastebin PRO Accounts SUMMER SPECIAL! For a limited time only get 40% discount on a LIFETIME PRO account! Offer Ends Soon!
SHARE
TWEET
tac init
a guest
Apr 10th, 2015
197
Never
- #!/bin/sh
- #
- ### BEGIN INIT INFO
- # Provides: tac-plus
- # Required-Start: $network
- # Required-Stop:
- # Default-Start: 2 3 4 5
- # Default-Stop: S 0 1 6
- # Short-Description: Start tac-plus server.
- # Description: Run the tac-plus server listening for
- # AAA ( access, acounting and autorization request )
- # from routers or RAS (remote access servers) via
- # tacacs+ protocol
- ### END INIT INFO
- PATH=/sbin:/bin:/usr/sbin:/usr/bin
- DAEMON=/usr/local/bin/tac_plus
- NAME=tac_plus
- DESC="Tacacs+ server"
- OTHER_OPTS="-d 256" # Default, if no /etc/default/tac-plus available
- CONFIG_FILE="/etc/tacacs/tac_plus.conf" # Default, if no /etc/default/tac-plus available
- test -f $DAEMON || exit 0
- if [ -r /etc/default/tac_plus ] ; then
- . /etc/default/tac_plus
- fi
- DAEMON_OPTS="-C $CONFIG_FILE $OTHER_OPTS"
- case "$1" in
- start)
- echo -n "Starting $DESC: "
- start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
- echo "$NAME."
- ;;
- stop)
- echo -n "Stopping $DESC: "
- start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON
- echo "$NAME."
- ;;
- restart|force-reload)
- echo -n "Restarting $DESC: "
- start-stop-daemon --stop --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON
- sleep 1
- start-stop-daemon --start --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
- echo "$NAME."
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart}" >&2
- exit 1
- ;;
- esac
- exit 0
RAW Paste Data
