Accept config path option

This commit is contained in:
thePR0M3TH3AN
2025-06-17 21:12:33 -04:00
parent 3a52e20caa
commit afc88a7324
6 changed files with 21 additions and 7 deletions

View File

@@ -48,6 +48,9 @@ while [[ $# -gt 0 ]]; do
esac
done
# convert CONFIG_PATH to absolute path for nested scripts
CONFIG_PATH="$(realpath "$CONFIG_PATH")"
# Helper function to update config
update_config_interactive() {
read -rp "Name: " name
@@ -102,11 +105,12 @@ if [[ $NON_INTERACTIVE -eq 0 ]]; then
fi
fi
# Regenerate QR codes based on the updated configuration
( cd src && ./generate_qr.sh )
( cd src && ./generate_qr.sh "$CONFIG_PATH" )
# Run obfuscation scripts
( cd src && ./obfuscate_index.sh && ./obfuscate_nostr.sh )
( cd src && ./obfuscate_index.sh "$CONFIG_PATH" && ./obfuscate_nostr.sh "$CONFIG_PATH" )
subdomain=$(jq -r '.subdomain' "$CONFIG_PATH")
DEST="host/${subdomain}"