wok diff openerp-server/stuff/etc/init.d/openerp-server @ rev 12254

Up: slitaz-configs (4.9.1) - Last minute bug fix
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 10 13:54:27 2012 +0200 (2012-04-10)
parents 33393d6644ce
children 0d8a1a3edc72
line diff
     1.1 --- a/openerp-server/stuff/etc/init.d/openerp-server	Thu Jun 11 23:24:27 2009 +0200
     1.2 +++ b/openerp-server/stuff/etc/init.d/openerp-server	Tue Apr 10 13:54:27 2012 +0200
     1.3 @@ -25,7 +25,7 @@
     1.4  
     1.5  case "$1" in
     1.6  	start)
     1.7 -		if [ -f "$PIDFILE" ]; then
     1.8 +		if active_pidfile $PIDFILE python ; then
     1.9  			echo "$NAME already running (PID: `cat $PIDFILE`)."
    1.10  			exit 1
    1.11  		fi
    1.12 @@ -34,12 +34,12 @@
    1.13  		status
    1.14  		sleep 4
    1.15  		# At boot OpenERP dont start correctly if we start it in background.
    1.16 -		if [ ! -f "$PIDFILE" ]; then
    1.17 +		if ! active_pidfile $PIDFILE python ; then
    1.18  			sleep 6
    1.19  			$DAEMON $OPTIONS > $LOGFILE
    1.20  		fi ;;
    1.21  	stop)
    1.22 -		if [ ! -f "$PIDFILE" ]; then
    1.23 +		if ! active_pidfile $PIDFILE python ; then
    1.24  			echo "$NAME is not running."
    1.25  			exit 1
    1.26  		fi