A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys, Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun VPN routing, and a web dashboard to manage it all. Free & open forever to self-host; optional paid hosted services fund it. See PROMISE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
22 lines
787 B
Bash
Executable File
22 lines
787 B
Bash
Executable File
#!/bin/bash
|
|
|
|
scanConfigsForRandomPassword()
|
|
{
|
|
if [[ "$CFG_REQUIREMENT_PASSWORDS" == "true" ]]; then
|
|
isHeader "Randomizing Config Passwords"
|
|
|
|
local passplaceholder="RANDOMIZEDPASSWORD"
|
|
local bcryptplaceholder="RANDOMIZEDBCRYPTPASSWORD"
|
|
|
|
# Find all config files in subdirectories (excluding .category files)
|
|
find "$configs_dir" -type f ! -name "*.category" -print0 | while IFS= read -r -d '' scanned_config_file; do
|
|
# Check for placeholders in the file
|
|
if sudo grep -qE "$passplaceholder|$bcryptplaceholder" "$scanned_config_file"; then
|
|
scanFileForRandomPasswordKeysUsers "$scanned_config_file"
|
|
fi
|
|
done
|
|
|
|
isSuccessful "Random password generation and update completed."
|
|
fi
|
|
}
|