Changeset 182

Show
Ignore:
Timestamp:
09/15/07 19:34:29 (7 years ago)
Author:
zigorou
Message:

+ fixed getting pid, using awk

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/shellscript/mogilefs/mogstored.init

    r180 r182  
    2424    echo -n $"Starting mogstored: " 
    2525    $prog --config /etc/mogilefs/mogstored.conf --daemonize & > /dev/null 
    26     PID=`netstat -nap | grep mogstored | head -1 | sed -r 's/\s+//g' | sed -r 's/.+LISTEN([0-9]+)\/mogst 
    27 ored/\1/'` 
    2826    RETVAL=$? 
     27    sleep 3 
     28    PID=`netstat -nap | grep mogstored | head -1 | awk '{ print $7 }' | sed -r 's/\/mogstored//'` 
    2929    echo 
    3030    [ $RETVAL = 0 ] && touch ${pidfile}