mirror of
https://github.com/Ravinou/borgwarehouse
synced 2024-06-04 06:52:30 +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
|
# Exit when any command fails
|
||||||
set -e
|
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
|
# Use jc to output a JSON format with du command
|
||||||
cd /var/borgwarehouse
|
cd ${home}/repos
|
||||||
sudo /usr/bin/du -s -- * | jc --du
|
du -s -- * | jc --du
|
||||||
|
|
Loading…
Reference in a new issue