From de6bfc0a726881828e126627b8e380c743da75bf Mon Sep 17 00:00:00 2001 From: Arthur Ferdinand Lindner Date: Wed, 3 Jul 2024 17:29:03 +0200 Subject: [PATCH] source env vars or they are empty in the user process --- helpers/shells/cronjob.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helpers/shells/cronjob.sh b/helpers/shells/cronjob.sh index 7f91459..49b4aae 100755 --- a/helpers/shells/cronjob.sh +++ b/helpers/shells/cronjob.sh @@ -1,7 +1,9 @@ -#!/usr/bin/env bash +#!/bin/bash bash # This shell can be called to execute all cronjobs to refresh the instance # This may be enabled as a setting to refresh the storage used after any borg serve command finishes +source /home/borgwarehouse/app/.env + curl --request POST --url "${NEXTAUTH_URL}/api/cronjob/checkStatus" --header "Authorization: Bearer ${CRONJOB_KEY}" curl --request POST --url "${NEXTAUTH_URL}/api/cronjob/getStorageUsed" --header "Authorization: Bearer ${CRONJOB_KEY}" \ No newline at end of file