#! /bin/sh
#
# autolog: Terminates connections for idle users
#
### BEGIN INIT INFO
# Provides:          autolog
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start the autolog daemon firewall at boot time
# Description:       Script to start/stop/reload the autolog daemon
### END INIT INFO
#
# Copyright (c) 2000 Carsten Juerges, Hannover, Germany.  All rights reserved.
# Author: Carsten Juerges <juerges@cip-bau.uni-hannover.de>, 2000
# Debian-ized by Paul Telford <paul@droflet.net> 01/30/2003
# Make LSB-compliant on 01/06/2007 by Luis Uribe <acme@eviled.org> 

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/autolog
NAME=autolog
DESC="terminates connections for idle users"
SCRIPTNAME=/etc/init.d/$NAME

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

test -x /usr/sbin/autolog || exit 0

case "$1" in
    start)
	echo -n "Starting autolog daemon"
	start-stop-daemon --start --quiet --exec $DAEMON
	echo "."
	;;
    stop)
	echo -n "Shutting down autolog daemon"
	start-stop-daemon --stop --quiet --exec $DAEMON
	echo "."
	;;
    force-reload|restart)
	echo -n "Restarting autolog daemon"
	start-stop-daemon --stop --quiet --exec $DAEMON
	start-stop-daemon --start --quiet --exec $DAEMON
	echo "."
	;;
    *)
	echo "Usage: $0 {start|stop|restart|force-reload}"
	exit 1
esac

exit 0
