mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-10 17:22:00 -04:00
remove trailing whitespace
This commit is contained in:
parent
e1edc8079f
commit
0b6709392b
104 changed files with 1479 additions and 1479 deletions
|
@ -8,8 +8,8 @@
|
|||
ERROR_HANDLING=0
|
||||
# Your email address which should recieve the error messages
|
||||
EMAIL_ADDRESS="no-reply@example.com"
|
||||
# Sets the minimun amount of time betweens the sending of error emails.
|
||||
# This ensures you not get spamed while a endless reboot loop
|
||||
# Sets the minimun amount of time betweens the sending of error emails.
|
||||
# This ensures you not get spamed while a endless reboot loop
|
||||
# It's the time in seconds
|
||||
TIME_BETWEEN_EMAILS=600 # 10 minutes
|
||||
|
||||
|
@ -37,7 +37,7 @@ do
|
|||
if [ ! -f $1 ]; then
|
||||
touch $1 || ( echo "Logfile '$1' is not writeable" && exit 1 )
|
||||
fi
|
||||
|
||||
|
||||
#check if the file is writeable
|
||||
if [ ! -w $1 ]; then
|
||||
echo "Logfile '$1' is not writeable"
|
||||
|
@ -46,21 +46,21 @@ do
|
|||
|
||||
#start the application
|
||||
bin/run.sh >>$1 2>>$1
|
||||
|
||||
|
||||
#Send email
|
||||
if [ $ERROR_HANDLING = 1 ]; then
|
||||
TIME_NOW=$(date +%s)
|
||||
TIME_SINCE_LAST_SEND=$(($TIME_NOW - $LAST_EMAIL_SEND))
|
||||
|
||||
|
||||
if [ $TIME_SINCE_LAST_SEND -gt $TIME_BETWEEN_EMAILS ]; then
|
||||
printf "Server was restared at: $(date)\nThe last 50 lines of the log before the error happens:\n $(tail -n 50 $1)" | mail -s "Pad Server was restarted" $EMAIL_ADDRESS
|
||||
|
||||
|
||||
LAST_EMAIL_SEND=$TIME_NOW
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo "RESTART!" >>$1
|
||||
|
||||
|
||||
#Sleep 10 seconds before restart
|
||||
sleep 10
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue