Skip to content
Snippets Groups Projects
Commit cf786f03 authored by brinn's avatar brinn
Browse files

fix: spurious error messages when delting PIDFILE

SVN: 7462
parent 66333604
No related branches found
No related tags found
No related merge requests found
...@@ -176,7 +176,7 @@ case "$command" in ...@@ -176,7 +176,7 @@ case "$command" in
n=0 n=0
while [ $n -lt $MAX_LOOPS ]; do while [ $n -lt $MAX_LOOPS ]; do
sleep 1 sleep 1
if [ ! -e $PIDFILE ]; then if [ ! -f $PIDFILE ]; then
break break
fi fi
if [ -s $STARTUPLOG ]; then if [ -s $STARTUPLOG ]; then
...@@ -202,7 +202,7 @@ case "$command" in ...@@ -202,7 +202,7 @@ case "$command" in
echo "(pid $PID)" echo "(pid $PID)"
fi fi
else else
test -e $PIDFILE && rm -f $PIDFILE test -e $PIDFILE && rm -f $PIDFILE 2> /dev/null
echo "FAILED" echo "FAILED"
echo "startup log says:" echo "startup log says:"
cat $STARTUPLOG cat $STARTUPLOG
...@@ -221,13 +221,15 @@ case "$command" in ...@@ -221,13 +221,15 @@ case "$command" in
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "(pid $PID)" echo "(pid $PID)"
# Shouldn't be necessary as Datamover deletes the file itself, but just to be sure # Shouldn't be necessary as Datamover deletes the file itself, but just to be sure
test -e $PIDFILE && rm $PIDFILE test -f $PIDFILE && rm $PIDFILE 2> /dev/null
else else
echo "FAILED" echo "FAILED"
fi fi
else else
rm $PIDFILE if [ -f $PIDFILE ]; then
echo "(was dead - cleaned up pid file)" rm $PIDFILE 2> /dev/null
echo "(was dead - cleaned up pid file)"
fi
fi fi
else else
echo "(not running - nothing to do)" echo "(not running - nothing to do)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment