diff --git a/installers/common.sh b/installers/common.sh index c4b8052a..8eaca706 100644 --- a/installers/common.sh +++ b/installers/common.sh @@ -422,9 +422,29 @@ function _prompt_install_feature() { if [ "$answer" != "${answer#[Nn]}" ]; then _install_status 0 "(Skipped)" else + echo -e $function fi + elif [ "$opt" == "pv_option" ]; then + # Iterate over the VPN provider options + valid_ids=($(jq -r '.providers[].id' "$webroot_dir/config/vpn-providers.json")) + # check if pv_option is defined + local value=${!opt} + local found=0 + for id in "${valid_ids[@]}"; do + if [ "$id" == "$value" ]; then + found=1 + break # we found a match + fi + done + if [ $found == 1 ]; then + echo -e + $function + else + _install_status 0 "Invalid VPN provider ID ${!opt} - (Skipped)" + fi elif [ "${!opt}" == 1 ]; then + echo -e $function else echo "(Skipped)" diff --git a/installers/raspbian.sh b/installers/raspbian.sh index fe368670..2b196bbd 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -106,6 +106,7 @@ function _parse_params() { restapi_option=1 adblock_option=1 wg_option=1 + pv_option=0 insiders=0 ssh=0 minwrite=0