mirror of
https://github.com/Ravinou/borgwarehouse
synced 2026-03-14 14:25:46 +01:00
feat: get storage with single unix user
This commit is contained in:
parent
d92dead1bd
commit
af922219eb
1 changed files with 10 additions and 2 deletions
|
|
@ -14,6 +14,14 @@
|
|||
# Exit when any command fails
|
||||
set -e
|
||||
|
||||
# Load .env if exists
|
||||
if [[ -f .env ]]; then
|
||||
source .env
|
||||
fi
|
||||
|
||||
# Default value if .env not exists
|
||||
: "${home:=/home/borgwarehouse}"
|
||||
|
||||
# Use jc to output a JSON format with du command
|
||||
cd /var/borgwarehouse
|
||||
sudo /usr/bin/du -s -- * | jc --du
|
||||
cd ${home}/repos
|
||||
du -s -- * | jc --du
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue