Update w/ _install_mobile_clients @zbchristian

This commit is contained in:
billz 2021-04-22 08:13:05 +01:00
parent 2032b27ad0
commit f24373d7f8
1 changed files with 22 additions and 0 deletions

View File

@ -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'"
}