mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
bin: Log the date in the restart message
This commit is contained in:
parent
e4fec3883b
commit
98e6ec3517
1 changed files with 4 additions and 2 deletions
|
@ -41,6 +41,8 @@ while true; do
|
||||||
# Start the application
|
# Start the application
|
||||||
bin/run.sh "$@" >>${LOG} 2>>${LOG}
|
bin/run.sh "$@" >>${LOG} 2>>${LOG}
|
||||||
|
|
||||||
|
TIME_FMT=$(date)
|
||||||
|
|
||||||
# Send email
|
# Send email
|
||||||
if [ "$ERROR_HANDLING" = 1 ]; then
|
if [ "$ERROR_HANDLING" = 1 ]; then
|
||||||
TIME_NOW=$(date +%s)
|
TIME_NOW=$(date +%s)
|
||||||
|
@ -49,7 +51,7 @@ while true; do
|
||||||
if [ "$TIME_SINCE_LAST_SEND" -gt "$TIME_BETWEEN_EMAILS" ]; then
|
if [ "$TIME_SINCE_LAST_SEND" -gt "$TIME_BETWEEN_EMAILS" ]; then
|
||||||
{
|
{
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Server was restarted at: $(date)
|
Server was restarted at: ${TIME_FMT}
|
||||||
The last 50 lines of the log before the error happens:
|
The last 50 lines of the log before the error happens:
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -60,7 +62,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pecho "RESTART!" >>${LOG}
|
pecho "RESTART! ${TIME_FMT}" >>${LOG}
|
||||||
|
|
||||||
# Sleep 10 seconds before restart
|
# Sleep 10 seconds before restart
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
Loading…
Reference in a new issue