From 98e6ec3517b07fc8a2eee4836200d04b7781bbd8 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 14 May 2020 18:14:25 -0400 Subject: [PATCH] bin: Log the date in the restart message --- bin/safeRun.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/safeRun.sh b/bin/safeRun.sh index b242199b1..7bb307f8f 100755 --- a/bin/safeRun.sh +++ b/bin/safeRun.sh @@ -41,6 +41,8 @@ while true; do # Start the application bin/run.sh "$@" >>${LOG} 2>>${LOG} + TIME_FMT=$(date) + # Send email if [ "$ERROR_HANDLING" = 1 ]; then TIME_NOW=$(date +%s) @@ -49,7 +51,7 @@ while true; do if [ "$TIME_SINCE_LAST_SEND" -gt "$TIME_BETWEEN_EMAILS" ]; then { cat <>${LOG} + pecho "RESTART! ${TIME_FMT}" >>${LOG} # Sleep 10 seconds before restart sleep 10