mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Changed routing system to use the more common path approach instead of query strings.
This commit is contained in:
@@ -169,7 +169,15 @@ function _create_raspap_directories() {
|
||||
# Create a directory to store networking configs
|
||||
echo "Creating $raspap_dir/networking"
|
||||
sudo mkdir -p "$raspap_dir/networking"
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
# Copy existing dhcpcd.conf to use as base config
|
||||
echo "Adding /etc/dhcpcd.conf as base configuration"
|
||||
cat /etc/dhcpcd.conf | sudo tee -a "$raspap_dir/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'"
|
||||
>>>>>>> 26d0dbfe... Changed routing system to use the more common path approach instead of query strings.
|
||||
}
|
||||
|
||||
# Generate hostapd logging and service control scripts
|
||||
@@ -202,6 +210,20 @@ function _create_lighttpd_scripts() {
|
||||
_install_status 0
|
||||
}
|
||||
|
||||
# Copy extra config files required to configure lighthttpd
|
||||
function _install_lighttpd_configs() {
|
||||
_install_log "Copying lighttpd extra config files"
|
||||
|
||||
# Copy config files
|
||||
echo "Copying 50-raspap-router.conf to /etc/lighttpd/conf-available"
|
||||
sudo cp "$webroot_dir/config/50-raspap-router.conf" "/etc/lighttpd/conf-available" || _install_status 1 "Unable to copy lighttpd config file."
|
||||
# link into conf-enabled
|
||||
echo "Creating link to /etc/lighttpd/conf-enabled"|| _install_status 1 "Unable to copy lighthttpd config file."
|
||||
sudo ln -s "/etc/lighttpd/conf-available/50-raspap-router.conf" "/etc/lighttpd/conf-enabled/50-raspap-router.conf" || _install_status 1 "Unable to symlink lighttpd config file."
|
||||
sudo systemctl restart lighttpd.service || _install_status 1 "Unable to restart lighttpd"
|
||||
_install_status 0
|
||||
}
|
||||
|
||||
# Prompt to install ad blocking
|
||||
function _prompt_install_adblock() {
|
||||
_install_log "Configure ad blocking (Beta)"
|
||||
@@ -578,3 +600,28 @@ function _install_complete() {
|
||||
fi
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
function _install_raspap() {
|
||||
_display_welcome
|
||||
_config_installation
|
||||
_update_system_packages
|
||||
_install_dependencies
|
||||
_enable_php_lighttpd
|
||||
_create_raspap_directories
|
||||
_optimize_php
|
||||
_check_for_old_configs
|
||||
_download_latest_files
|
||||
_change_file_ownership
|
||||
_create_hostapd_scripts
|
||||
_create_lighttpd_scripts
|
||||
_install_lighttpd_configs
|
||||
_move_config_file
|
||||
_default_configuration
|
||||
_configure_networking
|
||||
_prompt_install_adblock
|
||||
_prompt_install_openvpn
|
||||
_patch_system_files
|
||||
_install_complete
|
||||
}
|
||||
>>>>>>> 26d0dbfe... Changed routing system to use the more common path approach instead of query strings.
|
||||
|
@@ -219,6 +219,12 @@ function _remove_sudoers() {
|
||||
echo "Done."
|
||||
}
|
||||
|
||||
function _remove_lighttpd_config() {
|
||||
echo "Removing ${raspap_sudoers}"
|
||||
sudo rm "/etc/lighttpd/conf-available/50-raspap-router.conf" "/etc/lighttpd/conf-enabled/50-raspap-router.conf" || _install_error "Unable to remove lighttpd config"
|
||||
echo "Done."
|
||||
}
|
||||
|
||||
function _uninstall_complete() {
|
||||
_install_log "Uninstall completed"
|
||||
echo "It is recommended that you reboot your system as a final step."
|
||||
@@ -230,6 +236,7 @@ function _remove_raspap() {
|
||||
_remove_raspap_service
|
||||
_restore_networking
|
||||
_remove_raspap_directories
|
||||
_remove_lighttpd_config
|
||||
_remove_installed_packages
|
||||
_remove_sudoers
|
||||
_uninstall_complete
|
||||
|
Reference in New Issue
Block a user