#!/bin/sh
#
# ax25d         This shell script takes care of starting and stopping
#               the ax25-tools ax25d daemon.
#
# chkconfig: - 96 04
# description: ax25-tools ax25d daemon

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

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

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

DAEMON=ax25d

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n $"Starting $DAEMON: "
        daemon $DAEMON
	RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch /var/lock/subsys/$DAEMON
				return $RETVAL
        ;;
  stop)
        # Stop daemons.
        echo -n $"Shutting down $DAEMON: "
	killproc $DAEMON
	RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$DAEMON
        ;;
  status)
	status $DAEMON
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
	condrestart)
		[ -f /var/lock/subsys/$DAEMON ] && restart || :
	;;
  *)
        echo $"Usage: $DAEMON {start|stop|restart|status}"
        exit 1
esac

exit $RETVAL
