From 1a4c6408353ee9fb3b19a6cc476447343bb1d546 Mon Sep 17 00:00:00 2001 From: Jens L Date: Fri, 14 Apr 2023 14:39:31 +0200 Subject: [PATCH] lifecycle: fix worker healthcheck (#5259) closes #5258 Signed-off-by: Jens Langhammer --- lifecycle/ak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lifecycle/ak b/lifecycle/ak index ce20c8749..2dec9c95e 100755 --- a/lifecycle/ak +++ b/lifecycle/ak @@ -81,7 +81,7 @@ elif [[ "$1" == "healthcheck" ]]; then if [[ $mode == "server" ]]; then exec curl --user-agent "goauthentik.io lifecycle Healthcheck" -I http://localhost:9000/-/health/ready/ elif [[ $mode == "worker" ]]; then - mtime=$(stat -f %m $WORKER_HEARTBEAT) + mtime=$(date -r $WORKER_HEARTBEAT +"%s") time=$(date +"%s") if [ "$(( $time - $mtime ))" -gt "30" ]; then log "Worker hasn't updated heartbeat in 30 seconds"