mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 11:25:49 +00:00
fix: Simplify conditional checks
This commit is contained in:
parent
4162ef862c
commit
6cabd91f39
1 changed files with 3 additions and 3 deletions
|
|
@ -88,9 +88,9 @@ addShare() {
|
||||||
} > "/etc/samba/smb.conf"
|
} > "/etc/samba/smb.conf"
|
||||||
|
|
||||||
share="/data"
|
share="/data"
|
||||||
[ ! -d "$share" ] && [ -d "$STORAGE/data" ] && share="$STORAGE/data"
|
[ ! -d "$share" && -d "$STORAGE/data" ] && share="$STORAGE/data"
|
||||||
[ ! -d "$share" ] && [ -d "/shared" ] && share="/shared"
|
[ ! -d "$share" && -d "/shared" ] && share="/shared"
|
||||||
[ ! -d "$share" ] && [ -d "$STORAGE/shared" ] && share="$STORAGE/shared"
|
[ ! -d "$share" && -d "$STORAGE/shared" ] && share="$STORAGE/shared"
|
||||||
|
|
||||||
if ! addShare "$share" "Data" "Shared"; then
|
if ! addShare "$share" "Data" "Shared"; then
|
||||||
error "Failed to add shared folder '$share'. Please check its permissions." && return 0
|
error "Failed to add shared folder '$share'. Please check its permissions." && return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue