# HG changeset patch # User Pascal Bellard # Date 1249906199 -7200 # Node ID ce2d65bd0418b3952f7163267efe1edc5db0d5e5 # Parent c88819f363158bb331681a34c6153ae2b687f33e Postgrey: ensure pidfile is valid diff -r c88819f36315 -r ce2d65bd0418 postgrey/stuff/etc/init.d/postgrey --- a/postgrey/stuff/etc/init.d/postgrey Mon Aug 10 13:56:55 2009 +0200 +++ b/postgrey/stuff/etc/init.d/postgrey Mon Aug 10 14:09:59 2009 +0200 @@ -17,7 +17,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE postgrey ; then echo "$NAME already running." exit 1 fi @@ -38,7 +38,7 @@ status ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE postgrey ; then echo "$NAME is not running." exit 1 fi @@ -47,7 +47,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE postgrey ; then echo "$NAME is not running." exit 1 fi