This commit is contained in:
2023-03-23 21:40:52 -05:00
parent 545f92d03e
commit 8e248af881
3 changed files with 45 additions and 27 deletions

6
run.sh
View File

@@ -74,7 +74,7 @@ else
#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
rm -f ${MMFOLDER}/mm.stop*
elif [ "${1}" = "check" ] && [ "$(ip link | grep "${VPN_INTERFACE}")" = "" ] && [ ! -f ${MMFOLDER}/mm.vpn* ] && [ $(uptime_minutes) -lt 2 ]; then
elif [ "${1}" = "check" ] && [ "$(ip link | grep "${VPN_INTERFACE}")" = "" ] && [ ! -f ${MMFOLDER}/mm.vpn* ] && [ $(uptime_minutes) -lt 3 ]; then
rm -f ${MMFOLDER}/mm.stop*
else
echo -e "${idsCL[LightCyan]}Try again later, 'mm' program currently in use...${idsCL[Default]}"
@@ -82,9 +82,9 @@ else
fi
if [ ! -f ${MMFOLDER}/mm.stop.checking ] || [ "${1}" == "status" ]; then
touch ${MMFOLDER}/mm.stop.checking
[ "${1}" != "status" ] && touch ${MMFOLDER}/mm.stop.checking
${MMFOLDER}/mm-scripts.sh ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14}
rm -f ${MMFOLDER}/mm.stop.checking
[ "${1}" != "status" ] && rm -f ${MMFOLDER}/mm.stop.checking
fi
fi