From 4144d65aea03fcdc18b93e22b4eb386d0dbd3c78 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 26 Feb 2023 22:03:16 -0600 Subject: [PATCH] update --- mm-scripts.sh | 2 ++ run.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index 589bc5d..83dfb54 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -369,6 +369,7 @@ MMSTOP(){ [ "$(ip route show | grep default | cut -d' ' -f 3)" != "10.10.0.1" ] && /bin/ip route add default via 10.10.0.1 && ip route del $(cat ${MMFOLDER}/vpninfo.address) rm -f ${MMFOLDER}/vpninfo.* + rm -f ${MMFOLDER}/noservices* [ $VERBOSE = true ] && echo "$(date) - Added default route back in" >> $logfile echo -e "${idsCL[Green]} done${idsCL[Default]}" @@ -563,6 +564,7 @@ if [ ! -f ${MMFOLDER}/mm.update.stop ]; then echo -e " ${idsCL[Yellow]}check${idsCL[Default]} --> Crontab job to maintain VPN and services, run */1 min)" echo -e " ${idsCL[Yellow]}status${idsCL[Default]} --> View VPN and service status" echo -e " ${idsCL[Yellow]}update${idsCL[Default]} --> Check for and install new updates" + echo -e " ${idsCL[Yellow]}clear${idsCL[Default]} --> Clear all tmp files" echo "" echo "" exit 0;; diff --git a/run.sh b/run.sh index 52db78e..42958de 100755 --- a/run.sh +++ b/run.sh @@ -61,7 +61,9 @@ if [ "${1}" == "update" ]; then fi else - [ "${1}" == "clear" ] && rm -f ${MMFOLDER}/mm.* + if [ "${1}" == "clear" ]; then + rm -f ${MMFOLDER}/mm.* + fi if [ -f ${MMFOLDER}/mm.checking ] && [ "${1}" != "status" ]; then fd=$(expr $(date +%s) - $(stat -L --format %Y ${MMFOLDER}/mm.checking)) if [ ${fd} -gt 900 ]; then