mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-02-20 03:36:16 +00:00
improved cron tasks output and force authentication
This commit is contained in:
11
containers/cron/cron_runner.sh
Normal file
11
containers/cron/cron_runner.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
[ -z "$1" ] && exit 1
|
||||
|
||||
ENDPOINT="$1"
|
||||
CRON_KEY="$(cat /app_secrets/cron_key)"
|
||||
URL="http://wireguard-webadmin:8000/api/cron/${ENDPOINT}/?cron_key=${CRON_KEY}"
|
||||
|
||||
BODY="$(/usr/bin/curl -sS "$URL" 2>&1 || true)"
|
||||
echo "[$(date -Is)] ${ENDPOINT} -> ${BODY}"
|
||||
Reference in New Issue
Block a user