Fix style for a pandora_server sysvinit script

This commit is contained in:
Akihiro Uchida 2014-09-10 23:48:16 +09:00
parent 878bffbe22
commit 1f3bfe115c
1 changed files with 3 additions and 3 deletions

View File

@ -51,14 +51,14 @@ fi
# This function replace pidof, not working in the same way in different linux distros # This function replace pidof, not working in the same way in different linux distros
function pidof_pandora () ( function pidof_pandora () {
# This sets COLUMNS to XXX chars, because if command is run # This sets COLUMNS to XXX chars, because if command is run
# in a "strech" term, ps aux don't report more than COLUMNS # in a "strech" term, ps aux don't report more than COLUMNS
# characters and this will not work. # characters and this will not work.
COLUMNS=300 COLUMNS=300
PANDORA_PID=`ps aux | grep "$PANDORA_DAEMON $PANDORA_HOME" | grep -v grep | tail -1 | awk '{ print $2 }'` PANDORA_PID=`ps aux | grep "$PANDORA_DAEMON $PANDORA_HOME" | grep -v grep | tail -1 | awk '{ print $2 }'`
echo $PANDORA_PID echo $PANDORA_PID
) }
# Main script # Main script
@ -106,7 +106,7 @@ case "$1" in
kill $PANDORA_PID > /dev/null 2>&1 kill $PANDORA_PID > /dev/null 2>&1
COUNTER=0 COUNTER=0
while [ $COUNTER -lt $MAXWAIT ] while [ $COUNTER -lt $MAXWAIT ]
do do
_PID=`pidof_pandora` _PID=`pidof_pandora`
if [ "$_PID" != "$PANDORA_PID" ] if [ "$_PID" != "$PANDORA_PID" ]