mirror of
https://github.com/Ravinou/borgwarehouse
synced 2024-05-15 20:16:50 +02:00
feat: get storage with single unix user
This commit is contained in:
parent
04038b5b0d
commit
695e360d07
|
@ -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…
Reference in a new issue