From f24373d7f832b3a50c9e2540812c415680799405 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 22 Apr 2021 08:13:05 +0100 Subject: [PATCH] Update w/ _install_mobile_clients @zbchristian --- installers/common.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/installers/common.sh b/installers/common.sh index fe36303a..7523fad5 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -56,11 +56,30 @@ function _install_raspap() { _configure_networking _prompt_install_adblock _prompt_install_openvpn + _install_mobile_clients _prompt_install_wireguard _patch_system_files _install_complete } +# search for optional installation files names install_feature_*.sh +function _install_mobile_clients() { + if [ "$insiders" == 1 ]; then + _install_log "Installing support for mobile data clients" + for feature in $(ls $webroot_dir/installers/install_feature_*.sh) ; do + source $feature + f=$(basename $feature) + func="_${f%.*}" + if declare -f -F $func > /dev/null; then + echo "Installing $func" + $func || _install_status 1 "Unable to install feature ($func)" + else + _install_status 1 "Install file $f is missing install function $func" + fi + done + fi +} + # Prompts user to set installation options function _config_installation() { if [ "$upgrade" == 1 ]; then @@ -177,6 +196,9 @@ function _create_raspap_directories() { # Create a directory to store networking configs echo "Creating $raspap_dir/networking" sudo mkdir -p "$raspap_dir/networking" + # Copy existing dhcpcd.conf to use as base config + echo "Adding /etc/dhcpcd.conf as base configuration" + cat /etc/dhcpcd.conf | sudo tee -a /etc/raspap/networking/defaults > /dev/null echo "Changing file ownership of $raspap_dir" sudo chown -R $raspap_user:$raspap_user "$raspap_dir" || _install_status 1 "Unable to change file ownership for '$raspap_dir'" }