rsyncd 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/sh
  2. #######################################################################
  3. # Begin /etc/init.d/rsyncd
  4. #
  5. # Description : Start rsync server
  6. #
  7. # Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
  8. #
  9. # Version : LFS 7.0
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: rsyncd
  14. # Required-Start: $syslog $local_fs $network
  15. # Should-Start: $remote_fs
  16. # Required-Stop: $network
  17. # Should-Stop: $remote_fs
  18. # Default-Start: 3 4 5
  19. # Default-Stop: 0 1 2 6
  20. # Short-Description: Starts rsync daemon.
  21. # Description: Starts rsync daemon which is used to copy
  22. # files from and to remote machines.
  23. # X-LFS-Provided-By: BLFS / LFS 7.0
  24. ### END INIT INFO
  25. . /etc/rc.d/functions
  26. #$LastChangedBy: krejzi $
  27. #$Date: 2012-08-28 10:06:39 -0500 (Tue, 28 Aug 2012) $
  28. case "$1" in
  29. start)
  30. log_info_msg "Starting RSYNC Server..."
  31. start_daemon /usr/bin/rsync --daemon
  32. evaluate_retval
  33. ;;
  34. stop)
  35. log_info_msg "Stopping RSYNC Server..."
  36. killproc /usr/bin/rsync
  37. evaluate_retval
  38. ;;
  39. restart)
  40. $0 stop
  41. sleep 1
  42. $0 start
  43. ;;
  44. status)
  45. statusproc /usr/bin/rsync
  46. ;;
  47. *)
  48. echo "Usage: $0 {start|stop|restart|status}"
  49. exit 1
  50. ;;
  51. esac
  52. # End /etc/init.d/rsyncd