Browse Source

command_monitor.sh

restart server if there is no lockfile and feature is enabled
pull/668/head
PhilPhonic 10 years ago
parent
commit
4b9a05cfc6
  1. 9
      functions/command_monitor.sh

9
functions/command_monitor.sh

@ -60,6 +60,14 @@ fn_printdots "${servername}"
fn_scriptlog "${servername}" fn_scriptlog "${servername}"
sleep 1 sleep 1
if [ ! -f "${rootdir}/${lockselfname}" ]; then if [ ! -f "${rootdir}/${lockselfname}" ]; then
if [ ${startonmonitor} == "on" ]; then
fn_printinfo "No lock file found"
fn_scriptlog "No lock file found"
sleep 1
echo -en "\n"
fn_scriptlog "Monitor is starting ${servername}"
command_start.sh
else
fn_printinfo "Disabled: No lock file found" fn_printinfo "Disabled: No lock file found"
fn_scriptlog "Disabled: No lock file found" fn_scriptlog "Disabled: No lock file found"
sleep 1 sleep 1
@ -67,6 +75,7 @@ if [ ! -f "${rootdir}/${lockselfname}" ]; then
echo "To enable monitor run ./${selfname} start" echo "To enable monitor run ./${selfname} start"
exit 1 exit 1
fi fi
fi
updatecheck=$(ps -ef|grep "${selfname} update"|grep -v grep|wc -l) updatecheck=$(ps -ef|grep "${selfname} update"|grep -v grep|wc -l)
if [ "${updatecheck}" = "0" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament 2004" ]; then if [ "${updatecheck}" = "0" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament 2004" ]; then

Loading…
Cancel
Save