mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Add option to make mnt path shorter in logs
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
parent
bf4e31ae71
commit
606d48acc1
@ -4,6 +4,7 @@
|
||||
## Helpful functions
|
||||
INFO(){ echo "INFO:" "$@"; }
|
||||
ERRO(){ echo "ERROR:" "$@"; exit 1; }
|
||||
YN(){ [[ "$1" =~ (1|Y|y) ]]; }
|
||||
|
||||
## Global vars
|
||||
export BEESHOME BEESSTATUS
|
||||
@ -48,6 +49,7 @@ MNT_DIR="${MNT_DIR:-$WORK_DIR/mnt/$UUID}"
|
||||
BEESHOME="${BEESHOME:-$MNT_DIR/.beeshome}"
|
||||
BEESSTATUS="${BEESSTATUS:-$WORK_DIR/$UUID.status}"
|
||||
DB_SIZE="${DB_SIZE:-$((64*AL16M))}"
|
||||
LOG_SHORT_PATH="${LOG_SHORT_PATH:-N}"
|
||||
|
||||
INFO "Check: BTRFS UUID exists"
|
||||
if [ ! -d "/sys/fs/btrfs/$UUID" ]; then
|
||||
@ -95,5 +97,10 @@ fi
|
||||
chmod 700 "$DB_PATH"
|
||||
}
|
||||
|
||||
bees $MNT_DIR
|
||||
if YN "$LOG_SHORT_PATH"; then
|
||||
cd "$MNT_DIR" || exit 1
|
||||
bees .
|
||||
else
|
||||
bees "$MNT_DIR"
|
||||
fi
|
||||
exit 0
|
||||
|
@ -12,6 +12,9 @@ UUID=5d3c0ad5-bedf-463d-8235-b4d4f6f99476
|
||||
# BEESHOME="$MNT_DIR/.beeshome"
|
||||
# BEESSTATUS="$WORK_DIR/$UUID.status"
|
||||
|
||||
## Make path shorter in logs
|
||||
# LOG_SHORT_PATH=N
|
||||
|
||||
## Bees DB size
|
||||
# Hash Table Sizing
|
||||
# sHash table entries are 16 bytes each
|
||||
|
Loading…
x
Reference in New Issue
Block a user