From 3fcde8e997fdf779a7d249ae687fdc902991ce42 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 10 Jul 2023 19:25:48 -0500 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index c13c00d..d4ddde9 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -182,14 +182,15 @@ MMSTART(){ echo "$(date) - 24hr session limit reached, restarting vpn & services" >> ${MM_LOGFILE} echo -en "${idsCL[LightCyan]}24hr session limit reached, restarting vpn & services" else - sessiontimeout=$(date -d@${MM_VPN_RESTART} -u "-%H-%M-%S") + sessiontimeout=$(date -d@${MM_VPN_RESTART} -u "+%-H-%-M-%-S") IFS='-'; read -a session_timeout <<< "${sessiontimeout}"; unset IFS sessiontimeout="${session_timeout[0]} hr" [ ${session_timeout[1]} -gt 0 ] && sessiontimeout="${sessiontimeout}, ${session_timeout[1]} min" [ ${session_timeout[2]} -gt 0 ] && sessiontimeout="${sessiontimeout}, ${session_timeout[2]} sec" + echo "$(date) - Your '${sessiontimeout}' session limit reached, restarting vpn & services" echo "$(date) - Your '${sessiontimeout}' session limit reached, restarting vpn & services" >> ${MM_LOGFILE} - echo -en "${idsCL[LightCyan]}24hr session limit reached, restarting vpn & services" + echo -en "${idsCL[LightCyan]}Your '${idsCL[White]}${sessiontimeout}${idsCL[LightCyan]}' session limit reached, restarting vpn & services${idsCL[Default]}" fi [ -f ${TMPFOLDER}/mm.noservices ] && rv="vpn" || rv="" MMSTOP >/dev/null 2>&1