# This number should be more than enough (even if it is
# started multiple times together). It will try for up
# to 10 attempts (or 10 seconds) to execute.
MAX_ITERATION="10"
# This number should be more than enough (even if it is
# started multiple times together). It will try for up
# to 10 attempts (or 10 seconds) to execute.
MAX_ITERATION="10"
ls ${DIR}/var/run/${pfile}*.pid > /dev/null 2>&1
if [ $? = 0 ]; then
for j in `cat ${DIR}/var/run/${pfile}*.pid 2>/dev/null`; do
ls ${DIR}/var/run/${pfile}*.pid > /dev/null 2>&1
if [ $? = 0 ]; then
for j in `cat ${DIR}/var/run/${pfile}*.pid 2>/dev/null`; do