#! /bin/sh
# /etc/init.d/ppp: start or stop PPP.

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

# Set run_pppd to 1 to start ppp at boot or 0 to disable it.
run_pppd=0

case "$1" in
  start)
    if [ $run_pppd = 1 ]
    then
      start-stop-daemon --start --verbose --exec /usr/sbin/pppd
    fi
    ;;
  stop)
    if [ $run_pppd = 1 ]
    then
      start-stop-daemon --stop --verbose --exec /usr/sbin/pppd
    fi
    ;;
  *)
    echo "Usage: /etc/init.d/ppp {start|stop}"
    exit 1
esac

exit 0
