This commit is contained in:
2025-05-28 21:27:58 -05:00
parent 4b3d0d7d10
commit c4a8f5465b
3 changed files with 16 additions and 16 deletions

6
run.sh
View File

@@ -86,17 +86,17 @@ if [ "${1}" == "clear" ]; then
else
rm -f ${TMPFOLDER}/*
touch ${TMPFOLDER}/mm.stop
touch ${NM_FOLDER}/.tmp/mm.stop
# touch ${NM_FOLDER}/.tmp/mm.stop
fi
fi
if [ -f ${TMPFOLDER}/mm.stop.checking ]; then
#fd=$(expr $(date +%s) - $(stat -L --format %Y ${TMPFOLDER}/mm.stop.checking))
if [ $(expr $(date +%s) - $(stat -L --format %Y ${TMPFOLDER}/mm.stop.checking)) -gt 900 ]; then
rm -f ${TMPFOLDER}/mm.stop*
rm -f ${NM_FOLDER}/.tmp/mm.stop*
# rm -f ${NM_FOLDER}/.tmp/mm.stop*
elif [ "${1}" = "check" ] && [ "$(ip link | grep "${VPN_INTERFACE}")" = "" ] && [ ! -f ${TMPFOLDER}/mm.vpn* ] && [ $(uptime_minutes) -lt 3 ]; then
rm -f ${TMPFOLDER}/mm.stop*
rm -f ${NM_FOLDER}/.tmp/mm.stop*
# rm -f ${NM_FOLDER}/.tmp/mm.stop*
elif [[ "${allowrun}" != *" ${1} "* ]] && [ "${1}" != "" ]; then
echo -e "${idsCL[LightCyan]}Try again later, 'mm' program currently in use...${idsCL[Default]}"