mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2024-11-27 07:34:22 +01:00
22 lines
376 B
Bash
Executable File
22 lines
376 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
load_dir_env() {
|
|
local dir="$1"
|
|
|
|
shopt -s nullglob
|
|
|
|
for file in "$dir"/*; do
|
|
if [ -f "$file" ] && [[ "$(basename "$file")" != *=* ]]; then
|
|
varName="$(basename "$file")"
|
|
value="$(<"$file")"
|
|
export "${varName}=${value}"
|
|
fi
|
|
done
|
|
}
|
|
|
|
main() {
|
|
load_dir_env /run/secrets_normalized
|
|
}
|
|
|
|
main
|