Fix dead link. Hopefully extract mysql details from environment
This commit is contained in:
parent
edbfc92cb9
commit
dda8bd3e10
@ -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
|
||||
|
@ -128,7 +128,7 @@
|
||||
</div>
|
||||
{% elif show_login %}
|
||||
<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">
|
||||
<span>Login with Discord</span> <span class="icon"><i class="fas fa-chevron-right"></i></span>
|
||||
</p>
|
||||
|
Loading…
Reference in New Issue
Block a user