-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implemented option to auto refresh the UI after any backup
- Added an env var: AUTO_REFRESH to .env.sample (defaults to false) - Added helper script helpers/shells/cronjob.sh to call the borgwarehouse api for refreshing the repo status and used storage - Added function to add this feature when creating new repositories (if enabled) in helpers/shells/createRepo.sh - Added function to enable/disable this option during startup (depends on the configured bool for AUTO_REFRESH) in docker/docker-bw-init.sh. - This basically inserts or removes an additional command per forced-ssh-command that calls the previous created "cronjob.sh" helper script.
- Loading branch information
1 parent
43e3b70
commit 50a33cb
Showing
4 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/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}" |