Show
Ignore:
Timestamp:
02/28/09 20:42:51 (4 years ago)
Author:
khali
Message:

Create pid file only after successful initialization.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/pwm/fancontrol

    r5667 r5668  
    4343#DEBUG=1 
    4444MAX=255 
    45  
    46 if [ -f "$PIDFILE" ] 
    47 then 
    48         echo "File $PIDFILE exists, is fancontrol already running?" 
    49         exit 1 
    50 fi 
    51 echo $$ > "$PIDFILE" 
    5245 
    5346declare -i pwmval 
     
    181174fi 
    182175cd $DIR 
     176 
     177if [ -f "$PIDFILE" ] 
     178then 
     179        echo "File $PIDFILE exists, is fancontrol already running?" 
     180        exit 1 
     181fi 
     182echo $$ > "$PIDFILE" 
    183183 
    184184# $1 = pwm file name