#! /bin/sh
# Copyright (c) 1995-1998 S.u.S.E. GmbH Fuerth, Germany.

# Original Author: Mike Klinkert
# New Author: Manos Tsagias
# Modified to suit redhat distribution 12/08/2001

# chkconfig: 345 93 36
# description: Starts and stops the linesrv \ 
#              used to provide Internet access.

#       /etc/rc.d/init.d/linesrv

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# Check that mserver.conf exists.
[ -f /etc/linesrv.conf ] || exit 0

case "$1" in
    start)
	echo "Starting LineControl."
	/usr/sbin/linesrv
	;;
    stop)
	echo -n "Shutting down LineControl: "
	killproc /usr/sbin/linesrv
	echo
	;;
    restart|reload)
	$0 stop
	$0 start
	;;
    check|status)
	echo -n "Checking for LineControl, pid is: "
	pidof /usr/sbin/linesrv
	echo
	;;
    *)
	echo "Usage: $0 {start|stop|restart|check}"
	exit 1
	;;
esac

exit 0

