# HG changeset patch # User Pascal Bellard # Date 1236677085 0 # Node ID 3ad62af80036e5882edc9a1c52fbf4cd1890887c # Parent ef32c7a2afe4c5c7ab1a59a17df464961e342a18 rsync: improve start script diff -r ef32c7a2afe4 -r 3ad62af80036 rsync/stuff/etc/init.d/rsyncd --- a/rsync/stuff/etc/init.d/rsyncd Tue Mar 10 09:23:50 2009 +0000 +++ b/rsync/stuff/etc/init.d/rsyncd Tue Mar 10 09:24:45 2009 +0000 @@ -16,7 +16,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE rsync ; then echo "$NAME already running." exit 1 fi @@ -25,7 +25,7 @@ status ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE rsync ; then echo "$NAME is not running." exit 1 fi @@ -35,7 +35,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE rsync ; then echo "$NAME is not running." exit 1 fi