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.
dvmhost/dvm-watchdog.sh

19 lines
307 B

#!/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

Powered by TurnKey Linux.