#! /bin/sh
#
# This file was automatically customized by debmake on Sun, 27 Jul 1997 19:41:10 -0400
#
# Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for Debian by Christoph Lameter <clameter@debian.org>

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/pppupd
# The following value is extracted by debstd to figure out how to generate
# the postinst script. Edit the field to change the way the script is
# registered through update-rc.d (see the manpage for update-rc.d!)
FLAGS="defaults 50"

test -f $DAEMON || exit 0

case "$1" in
  start)  
    echo -n "Starting ppp keep-alive daemon: $DAEMON"
    start-stop-daemon --start --exec $DAEMON
    echo "."
    ;;
  stop)
    echo -n "Stopping ppp keep-alive daemon: $DAEMON." 
    start-stop-daemon --stop --exec $DAEMON
    echo "."
    ;;
  restart)
    echo -n "Restarting $DAEMON..."
    start-stop-daemon --stop --exec $DAEMON
    start-stop-daemon --start --exec $DAEMON
    echo "done."
    ;;
  force-reload)
    echo -n "Reloading $DAEMON configuration..."
    start-stop-daemon --stop --exec $DAEMON
    start-stop-daemon --start --exec $DAEMON
    echo "done."
    ;;
  *)
    echo "Usage: /etc/init.d/pppupd {start|stop|restart|force-reload}"
    exit 1
    ;;
esac

exit 0
