diff --git a/healthcheck b/healthcheck index cede199..3504c39 100755 --- a/healthcheck +++ b/healthcheck @@ -2,7 +2,10 @@ export $(grep -v '^#' /etc/reminder-rs/config.env | xargs -d '\n') -VAR=$(mysql -N -D reminders -e "SELECT COUNT(1) FROM reminders WHERE utc_time < NOW() - INTERVAL 10 MINUTE AND enabled = 1") +REGEX='mysql://([A-Za-z]+)@(.+)/(.+)' +[[ $DATABASE_URL =~ $REGEX ]] + +VAR=$(mysql -u "${BASH_REMATCH[1]}" -h "${BASH_REMATCH[2]}" -N -D "${BASH_REMATCH[3]}" -e "SELECT COUNT(1) FROM reminders WHERE utc_time < NOW() - INTERVAL 10 MINUTE AND enabled = 1") if [ "$VAR" -gt 0 ] then diff --git a/web/templates/base.html.tera b/web/templates/base.html.tera index 40dcf94..201d2c8 100644 --- a/web/templates/base.html.tera +++ b/web/templates/base.html.tera @@ -128,7 +128,7 @@ {% elif show_login %}