Update run.sh

This commit is contained in:
2023-04-29 22:52:58 -05:00
parent 83a4fa9f68
commit 40c7e9d775

15
run.sh
View File

@@ -82,12 +82,12 @@ if [ "${1}" == "update" ] || [ "${1}" == "setup" ]; then
echo -e "${idsCL[Red]}Could not connect to 'git.schroedercity.com' for updates${idsCL[Default]}" echo -e "${idsCL[Red]}Could not connect to 'git.schroedercity.com' for updates${idsCL[Default]}"
fi fi
fi
else if [ "${1}" == "clear" ]; then
if [ "${1}" == "clear" ]; then
[ ! -f ${MMFOLDER}/mm.stop ] && rm -f ${MMFOLDER}/mm.* || rm -f ${MMFOLDER}/mm.*; touch ${MMFOLDER}/mm.stop [ ! -f ${MMFOLDER}/mm.stop ] && rm -f ${MMFOLDER}/mm.* || rm -f ${MMFOLDER}/mm.*; touch ${MMFOLDER}/mm.stop
fi fi
if [ -f ${MMFOLDER}/mm.stop.checking ]; then if [ -f ${MMFOLDER}/mm.stop.checking ]; then
#fd=$(expr $(date +%s) - $(stat -L --format %Y ${MMFOLDER}/mm.stop.checking)) #fd=$(expr $(date +%s) - $(stat -L --format %Y ${MMFOLDER}/mm.stop.checking))
if [ $(expr $(date +%s) - $(stat -L --format %Y ${MMFOLDER}/mm.stop.checking)) -gt 900 ]; then if [ $(expr $(date +%s) - $(stat -L --format %Y ${MMFOLDER}/mm.stop.checking)) -gt 900 ]; then
rm -f ${MMFOLDER}/mm.stop* rm -f ${MMFOLDER}/mm.stop*
@@ -96,14 +96,13 @@ else
else else
echo -e "${idsCL[LightCyan]}Try again later, 'mm' program currently in use...${idsCL[Default]}" echo -e "${idsCL[LightCyan]}Try again later, 'mm' program currently in use...${idsCL[Default]}"
fi fi
fi fi
if [ ! -f ${MMFOLDER}/mm.stop.checking ] || [ "${1}" == "status" ] || [ "${1}" == "update-service" ] || [ "${1}" == "update-allservices" ] || [ "${1}" == "stop" ]; then if [ ! -f ${MMFOLDER}/mm.stop.checking ] || [ "${1}" == "status" ] || [ "${1}" == "update-service" ] || [ "${1}" == "update-allservices" ] || [ "${1}" == "stop" ]; then
[ "${1}" == "start" ] && rm -f ${MMFOLDER}/mm.stop [ "${1}" == "start" ] && rm -f ${MMFOLDER}/mm.stop
${MMFOLDER}/mm-scripts.sh ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${MMFOLDER}/mm-scripts.sh ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14}
fi
fi fi
echo echo
exit 0 exit 0