This commit is contained in:
2025-05-28 18:56:07 -05:00
parent 3086778096
commit ad2f5daedf
3 changed files with 18 additions and 0 deletions

3
run.sh
View File

@@ -86,14 +86,17 @@ if [ "${1}" == "clear" ]; then
else
rm -f ${TMPFOLDER}/*
touch ${TMPFOLDER}/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*
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*
elif [[ "${allowrun}" != *" ${1} "* ]] && [ "${1}" != "" ]; then
echo -e "${idsCL[LightCyan]}Try again later, 'mm' program currently in use...${idsCL[Default]}"