You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/bash
|
|
R_PATH=/opt/dvmhost
|
|
pushd ${R_PATH}
|
|
|
|
if [ -z $1 ]; then exit 99; fi
|
|
PID_FILE=$1
|
|
CONFIG_FILE=`cat $PID_FILE`
|
|
|
|
while [ true ]; do
|
|
pgrep -f "[d]vmhost.*${CONFIG_FILE}" >/dev/null
|
|
if [ $? -ne 0 ]; then
|
|
${R_PATH}/start-dvm.sh ${CONFIG_FILE} >/dev/null
|
|
fi
|
|
sleep 5s
|
|
done
|
|
|
|
popd
|
|
|