revert: Simplify conditional checks (#1414)

This reverts commit 9c08dc7b1e.
This commit is contained in:
Kroese 2025-09-21 23:04:29 +02:00 committed by GitHub
parent 9c08dc7b1e
commit 0f918c8cb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 27 deletions

View file

@ -88,9 +88,9 @@ addShare() {
} > "/etc/samba/smb.conf"
share="/data"
[ ! -d "$share" && -d "$STORAGE/data" ] && share="$STORAGE/data"
[ ! -d "$share" && -d "/shared" ] && share="/shared"
[ ! -d "$share" && -d "$STORAGE/shared" ] && share="$STORAGE/shared"
[ ! -d "$share" ] && [ -d "$STORAGE/data" ] && share="$STORAGE/data"
[ ! -d "$share" ] && [ -d "/shared" ] && share="/shared"
[ ! -d "$share" ] && [ -d "$STORAGE/shared" ] && share="$STORAGE/shared"
if ! addShare "$share" "Data" "Shared"; then
error "Failed to add shared folder '$share'. Please check its permissions." && return 0