# HG changeset patch # User Pascal Bellard # Date 1235253042 0 # Node ID 62384d6ba510be0b28847509e86061afb399b037 # Parent 22ab8eb50d81ae7149c7bfebc3cbc9becafe56cf Samba: improve start script diff -r 22ab8eb50d81 -r 62384d6ba510 samba/stuff/etc/init.d/samba --- a/samba/stuff/etc/init.d/samba Sat Feb 21 21:46:09 2009 +0000 +++ b/samba/stuff/etc/init.d/samba Sat Feb 21 21:50:42 2009 +0000 @@ -17,7 +17,7 @@ case "$1" in start) - if [ -f $SMBPIDFILE ] ; then + if active_pidfile $SMBPIDFILE smbd ; then echo "$NAME already running." exit 1 fi @@ -29,7 +29,7 @@ status ;; stop) - if [ ! -f $SMBPIDFILE ] ; then + if ! active_pidfile $SMBPIDFILE smbd ; then echo "$NAME is not running." exit 1 fi @@ -41,7 +41,7 @@ status ;; restart) - if [ ! -f $SMBPIDFILE ] ; then + if ! active_pidfile $SMBPIDFILE smbd ; then echo "$NAME is not running." exit 1 fi @@ -57,7 +57,7 @@ status ;; reload) - if [ ! -f $SMBPIDFILE ] ; then + if ! active_pidfile $SMBPIDFILE smbd ; then echo "$NAME is not running." exit 1 fi