#!/bin/sh
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/capiinit
NAME=isdnactivecards
DESC='ISDN active cards'
FLAGS="defaults"

test -f $DAEMON || exit 0    # sanity check

set -e

case "$1" in
  start)
    echo -n "Starting $DESC :"
    $DAEMON start
    echo ' done.'
    ;;
  stop)
    if [ -d /proc/capi ]; then
        echo -n "Stopping $DESC :"
        $DAEMON stop
        echo ' done.'
    fi
    exit 0
    ;;
  reload|restart|force-reload)
    # reload doesn't really work here...
    echo -n "Restarting $DESC :"
    if [ -d /proc/capi ]; then
        $DAEMON stop
    fi
    $DAEMON start
    echo ' done.'
    ;;
  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}"
    exit 1
    ;;
esac

exit 0
# vim:set ts=8 sw=4:
