diff --git a/rsync/.md5sum b/rsync/.md5sum index b6f6dc0f..ba89c4ee 100644 --- a/rsync/.md5sum +++ b/rsync/.md5sum @@ -1,4 +1,4 @@ 43bd6676f0b404326eee2d63be3cdcfe rsync-3.1.1.tar.gz bd6cc8e2c83d5e845af20a30e105fb5f rsync.driver -a71995f22768c931c5649a1336d25ffb rsyncd +d20f1ca0fb415a6788808c75170d951a rsyncd b4e95fa8c8f3ae13cfdf616abd6a3960 rsyncd.conf diff --git a/rsync/Pkgfile b/rsync/Pkgfile index e9a3e8cb..88936974 100644 --- a/rsync/Pkgfile +++ b/rsync/Pkgfile @@ -5,7 +5,7 @@ name=rsync version=3.1.1 -release=1 +release=2 source=(http://rsync.samba.org/ftp/$name/src/$name-$version.tar.gz \ rsyncd.conf rsyncd rsync.driver) diff --git a/rsync/rsyncd b/rsync/rsyncd index 85072111..bd2e8b23 100644 --- a/rsync/rsyncd +++ b/rsync/rsyncd @@ -3,20 +3,33 @@ # /etc/rc.d/rsyncd: start/stop rsyncd daemon # +SSD=/sbin/start-stop-daemon +PROG=/usr/bin/rsync +PID=/var/run/rsyncd.pid +OPTS="--daemon" + case $1 in start) - /usr/bin/rsync --daemon + $SSD --start --pidfile $PID --exec $PROG -- $OPTS ;; stop) - kill `cat /var/run/rsyncd.pid` + $SSD --stop --retry 10 --pidfile $PID ;; restart) $0 stop - sleep 2 $0 start ;; +status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running with pid $(cat $PID)" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; *) - echo "usage: $0 [start|stop|restart]" + echo "usage: $0 [start|stop|restart|status]" ;; esac