Fix dead link. Hopefully extract mysql details from environment

This commit is contained in:
jude 2023-06-23 11:56:53 +01:00
parent edbfc92cb9
commit dda8bd3e10
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,10 @@
export $(grep -v '^#' /etc/reminder-rs/config.env | xargs -d '\n') 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 ] if [ "$VAR" -gt 0 ]
then then

View File

@ -128,7 +128,7 @@
</div> </div>
{% elif show_login %} {% elif show_login %}
<div class="hero-foot has-text-centered"> <div class="hero-foot has-text-centered">
<a class="button is-size-4 is-rounded is-light" href="/oauth/login"> <a class="button is-size-4 is-rounded is-light" href="/login/discord">
<p class="is-size-4"> <p class="is-size-4">
<span>Login with Discord</span> <span class="icon"><i class="fas fa-chevron-right"></i></span> <span>Login with Discord</span> <span class="icon"><i class="fas fa-chevron-right"></i></span>
</p> </p>