Init script for rsyncd.

Ed: another one that was sitting in “drafts” for months.

#!/bin/bash
#
# Startup script for rsyncd.
#
# chkconfig: 345 86 16
# description: rsync rocks.
#

case “$1″ in
start)
echo “Starting rsyncd…”
/opt/rsync/bin/rsync –daemon –ipv4
;;
stop)
echo “Stopping rsyncd…”
killall /opt/rsync/bin/rsync
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo “Usage: $0 {start|stop|restart}”
exit 1
;;
esac

exit 0

This entry was posted in General, work and tagged , , , , , . Bookmark the permalink.

One Response to Init script for rsyncd.

  1. Dankoozy says:

    this wouldnt end too well if someone decided to shut down the daemon while other people were using rsync clients. but you get over that, this was the only rsync init script i could find. thx

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>