mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-27 07:31:09 +01:00
Create _enable_network_activity_monitor() + _symlink_net_activity()
This commit is contained in:
@@ -75,6 +75,7 @@ function _update_raspap() {
|
||||
_download_latest_files
|
||||
_change_file_ownership
|
||||
_patch_system_files
|
||||
_symlink_net_activity
|
||||
_create_plugin_scripts
|
||||
_install_complete
|
||||
}
|
||||
@@ -818,9 +819,32 @@ function _configure_networking() {
|
||||
echo -e
|
||||
_enable_raspap_daemon
|
||||
fi
|
||||
|
||||
# Enable RaspAP network activity monitor
|
||||
_enable_network_activity_monitor
|
||||
|
||||
_install_status 0
|
||||
}
|
||||
|
||||
# Install and enable RaspAP network activity monitor
|
||||
function _enable_network_activity_monitor() {
|
||||
_install_log "Enabling RaspAP network activity monitor"
|
||||
sudo cp $webroot_dir/installers/network-activity.sh "$raspap_dir/hostapd" || _install_status 1 "Unable to copy network-activity.sh"
|
||||
sudo cp $webroot_dir/installers/raspap-network-activity@.service /lib/systemd/system/ || _install_status 1 "Unable to move raspap-network-activity.service file"
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable raspap-network-activity@wlan0.service || _install_status 1 "Failed to enable raspap-network-activity.service"
|
||||
sudo systemctl start raspap-network-activity@wlan0.service || _install_status 1 "Failed to start raspap-network-activity.service"
|
||||
sleep 0.5
|
||||
_symlink_net_activity
|
||||
echo "Network activity monitor enabled"
|
||||
}
|
||||
|
||||
function _symlink_net_activity() {
|
||||
echo "Symlinking /dev/shm/net_activity to $webroot_dir/app/net_activity"
|
||||
sudo ln -sf /dev/shm/net_activity $webroot_dir/app/net_activity || _install_status 1 "Failed to link net_activity to ${webroot_dir}/app"
|
||||
sudo chown -R $raspap_user:$raspap_user $webroot_dir/app/net_activity || _install_status 1 "Unable to set ownership of ${webroot_dir}/app/net_activity"
|
||||
}
|
||||
|
||||
# Prompt to configure TCP BBR option
|
||||
function _prompt_configure_tcp_bbr() {
|
||||
_install_log "Configure TCP BBR congestion control"
|
||||
|
||||
Reference in New Issue
Block a user