fix: Use embedded SMB credentials (smb/Production2020!) as fallback
- credentials read from settings first - env vars override settings - embedded defaults (smb/Production2020!) used if nothing configured - allows immediate SMB mount on container startup without config Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
aef2b64d4e
commit
c40a2ddb89
1 changed files with 3 additions and 3 deletions
|
|
@ -24,9 +24,9 @@ get_setting() {
|
||||||
echo "$default"
|
echo "$default"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Read SMB credentials from settings.json (or use env vars as fallback)
|
# Read SMB credentials from settings.json, env vars, or use embedded defaults
|
||||||
SMB_USERNAME=$(get_setting 'smbUsername' "${SMB_USERNAME:-}")
|
SMB_USERNAME=$(get_setting 'smbUsername' "${SMB_USERNAME:-smb}")
|
||||||
SMB_PASSWORD=$(get_setting 'smbPassword' "${SMB_PASSWORD:-}")
|
SMB_PASSWORD=$(get_setting 'smbPassword' "${SMB_PASSWORD:-Production2020!}")
|
||||||
SMB_DOMAIN=$(get_setting 'smbDomain' "${SMB_DOMAIN:-}")
|
SMB_DOMAIN=$(get_setting 'smbDomain' "${SMB_DOMAIN:-}")
|
||||||
|
|
||||||
# Try to mount SMB share only if credentials are provided
|
# Try to mount SMB share only if credentials are provided
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue