Changeset 185 for lang/shellscript

Show
Ignore:
Timestamp:
09/15/07 20:24:51 (7 years ago)
Author:
zigorou
Message:

+ add success
+ add waiting create pid file

Location:
lang/shellscript/mogilefs
Files:
2 modified

Legend:

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

    r180 r185  
    1515prog=${PRPG-/usr/bin/mogilefsd} 
    1616pidfile=/var/run/mogilefsd.pid 
     17tmp_pidfile=/tmp/mogilefsd.pid 
    1718USER=mogile 
    1819 
     
    2425     
    2526    echo -n $"Starting mogilefsd: " 
    26     sudo -u ${USER} /usr/bin/mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon & 
     27    sudo -u ${USER} /usr/bin/mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon  
    2728    RETVAL=$? 
     29 
     30    sleep 3 
     31    mv $tmp_pidfile $pidfile 
     32 
     33    [ $RETVAL = 0 ] && success 
    2834    echo 
    29     [ $RETVAL = 0 ] 
    3035 
    3136    return $RETVAL 
  • lang/shellscript/mogilefs/mogstored.init

    r182 r185  
    2323     
    2424    echo -n $"Starting mogstored: " 
    25     $prog --config /etc/mogilefs/mogstored.conf --daemonize & > /dev/null 
     25    $prog --config /etc/mogilefs/mogstored.conf --daemonize > /dev/null 
    2626    RETVAL=$? 
    2727    sleep 3 
    2828    PID=`netstat -nap | grep mogstored | head -1 | awk '{ print $7 }' | sed -r 's/\/mogstored//'` 
     29    [ $RETVAL = 0 ] && touch ${pidfile} && success 
    2930    echo 
    30     [ $RETVAL = 0 ] && touch ${pidfile} 
    3131    echo $PID > ${pidfile} 
    3232