pppd.servis 1007 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. # Begin $rc_base/init.d/sshd
  3. # Based on sysklogd script from LFS-3.1 and earlier.
  4. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
  5. # Add create user and Groups - thierryn1@hispeed.ch
  6. # $Id: pppd,v 1.2 2008/02/03 10:08:07 root Exp $
  7. . /etc/rc.d/init.d/functions
  8. newgroup=pppusers
  9. newid=52
  10. getent group $newgroup > /dev/null || /sbin/groupadd -g $newid $newgroup
  11. case "$1" in
  12. start)
  13. mknod /dev/ppp c 108 0
  14. boot_mesg "Starting PPP Daemon..."
  15. loadproc /usr/sbin/pppd > /dev/null
  16. ;;
  17. stop)
  18. boot_mesg "Stopping PPP Daemon..."
  19. killproc /usr/sbin/pppd
  20. ;;
  21. reload)
  22. boot_mesg "Reloading PPP Daemon..."
  23. reloadproc /usr/sbin/pppd > /dev/null
  24. ;;
  25. restart)
  26. $0 stop
  27. sleep 1
  28. $0 start
  29. ;;
  30. status)
  31. statusproc /usr/sbin/pppd
  32. ;;
  33. *)
  34. echo "Usage: $0 {start|stop|reload|restart|status}"
  35. exit 1
  36. ;;
  37. esac
  38. # End $rc_base/init.d/sshd