mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Update w/ _install_mobile_clients @zbchristian
This commit is contained in:
parent
2032b27ad0
commit
f24373d7f8
@ -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'"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user