mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Convert /etc/lqos to /etc/lqos.conf globally
Too much chance of someone putting /etc/lqos as a directory.
This commit is contained in:
parent
75950be5fc
commit
145d9d9a27
@ -61,7 +61,7 @@ This will take a while the first time, but it puts everything in the right place
|
||||
Copy the daemon configuration file to `/etc`:
|
||||
|
||||
```
|
||||
sudo cp lqos.example /etc/lqos
|
||||
sudo cp lqos.example /etc/lqos.conf
|
||||
```
|
||||
|
||||
Now edit the file to match your setup:
|
||||
|
@ -6,7 +6,7 @@
|
||||
# You still need to setup services to run `lqosd` and `lqos_node_manager`
|
||||
# automatically.
|
||||
#
|
||||
# Don't forget to setup `/etc/lqos`
|
||||
# Don't forget to setup `/etc/lqos.conf`
|
||||
PROGS="lqosd lqtop xdp_iphash_to_cpu_cmdline xdp_pping lqos_node_manager webusers"
|
||||
mkdir -p bin/static
|
||||
pushd rust
|
||||
@ -37,7 +37,7 @@ popd
|
||||
cp rust/target/release/liblqos_python.so .
|
||||
|
||||
echo "-----------------------------------------------------------------"
|
||||
echo "Don't forget to setup /etc/lqos!"
|
||||
echo "Don't forget to setup /etc/lqos.conf!"
|
||||
echo "Template .service files can be found in bin/"
|
||||
echo ""
|
||||
echo "Run rust/remove_pinned_maps.sh before you restart lqosd"
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
`lqos_config` is designed to manage configuration of LibreQoS.
|
||||
|
||||
Since all of the parts of the system need to know where to find LibreQoS, it first looks for a file named `/etc/lqos` and uses that to locate the LibreQoS installation.
|
||||
Since all of the parts of the system need to know where to find LibreQoS, it first looks for a file named `/etc/lqos.conf` and uses that to locate the LibreQoS installation.
|
||||
|
||||
`/etc/lqos` looks like this:
|
||||
`/etc/lqos.conf` looks like this:
|
||||
|
||||
```toml
|
||||
lqos_directory = '/opt/libreqos'
|
||||
|
@ -1,10 +1,10 @@
|
||||
//! Manages the `/etc/lqos` file.
|
||||
//! Manages the `/etc/lqos.conf` file.
|
||||
|
||||
use anyhow::{Error, Result};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::path::Path;
|
||||
|
||||
/// Represents the top-level of the `/etc/lqos` file. Serialization
|
||||
/// Represents the top-level of the `/etc/lqos.conf` file. Serialization
|
||||
/// structure.
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct EtcLqos {
|
||||
@ -105,12 +105,12 @@ pub struct BridgeVlan {
|
||||
}
|
||||
|
||||
impl EtcLqos {
|
||||
/// Loads `/etc/lqos`.
|
||||
/// Loads `/etc/lqos.conf`.
|
||||
pub fn load() -> Result<Self> {
|
||||
if !Path::new("/etc/lqos").exists() {
|
||||
return Err(Error::msg("You must setup /etc/lqos"));
|
||||
if !Path::new("/etc/lqos.conf").exists() {
|
||||
return Err(Error::msg("You must setup /etc/lqos.conf"));
|
||||
}
|
||||
let raw = std::fs::read_to_string("/etc/lqos")?;
|
||||
let raw = std::fs::read_to_string("/etc/lqos.conf")?;
|
||||
let config: Self = toml::from_str(&raw)?;
|
||||
//println!("{:?}", config);
|
||||
Ok(config)
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! The `lqos_config` crate stores and handles LibreQoS configuration.
|
||||
//! Configuration is drawn from:
|
||||
//! * The `ispConfig.py` file.
|
||||
//! * The `/etc/lqos` file.
|
||||
//! * The `/etc/lqos.conf` file.
|
||||
//! * `ShapedDevices.csv` files.
|
||||
//! * `network.json` files.
|
||||
|
||||
|
@ -20,7 +20,7 @@ pub struct ConfigShapedDevices {
|
||||
|
||||
impl ConfigShapedDevices {
|
||||
/// The path to the current `ShapedDevices.csv` file, determined
|
||||
/// by acquiring the prefix from the `/etc/lqos` configuration
|
||||
/// by acquiring the prefix from the `/etc/lqos.conf` configuration
|
||||
/// file.
|
||||
pub fn path() -> Result<PathBuf> {
|
||||
let cfg = etc::EtcLqos::load()?;
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
## Required Configuration
|
||||
|
||||
You *must* have a file present called `/etc/lqos`. At a minimum, it must tell `lqosd` where to find the LibreQoS configuration. For example:
|
||||
You *must* have a file present called `/etc/lqos.conf`. At a minimum, it must tell `lqosd` where to find the LibreQoS configuration. For example:
|
||||
|
||||
```toml
|
||||
lqos_directory = '/opt/libreqos/v1.3'
|
||||
@ -19,7 +19,7 @@ lqos_directory = '/opt/libreqos/v1.3'
|
||||
|
||||
## Offload Tuning
|
||||
|
||||
`lqosd` can set kernel tunables for you on start-up. These are specified in `/etc/lqos` also, in the `[tuning]` section:
|
||||
`lqosd` can set kernel tunables for you on start-up. These are specified in `/etc/lqos.conf` also, in the `[tuning]` section:
|
||||
|
||||
```toml
|
||||
[tuning]
|
||||
@ -37,7 +37,7 @@ disable_offload = [ "gso", "tso", "lro", "sg", "gro" ]
|
||||
|
||||
## Bifrost - eBPF Kernel Bridge
|
||||
|
||||
To enable the kernel-side eBPF bridge, edit `/etc/lqos`:
|
||||
To enable the kernel-side eBPF bridge, edit `/etc/lqos.conf`:
|
||||
|
||||
```toml
|
||||
[bridge]
|
||||
|
Loading…
Reference in New Issue
Block a user