(Very alpha!) Add dpkg builder and initial configurator

* Adds a new Rust program, `lqos_setup`.
    * If no /etc/lqos.conf is found, prompts for interfaces and
      creates a dual-interface XDP bridge setup.
    * If no /opt/libreqos/src/ispConfig.py is found, prompts
      for bandwidth and creates one (using the interfaces also)
    * Same for ShapedDevices.csv and network.json
    * If no webusers are found, prompts to make one.
* Adds build_dbpkg.sh
    * Creates a new directory named `dist`
    * Builds the Rust components in a portable mode.
    * Creates a list of dependencies and DEBIAN directory
      with control and postinst files.
    * Handles PIP dependencies in postinst
    * Calls the new `lqos_setup` program for final
      configuration.
    * Sets up the daemons in systemd and enables them.

In very brief testing, I had a working XDP bridge with
1 fake user and a total bandwidth limit configured and
working after running:

dpkg -i 1.4-1.dpkg
apt -f install

Could still use some tweaking.
This commit is contained in:
Herbert Wolverson
2023-02-21 20:26:34 +00:00
parent e74662631c
commit 3e9ff0c0f5
6 changed files with 367 additions and 0 deletions

1
.gitignore vendored
View File

@@ -52,6 +52,7 @@ src/lastRun.txt
src/liblqos_python.so
src/webusers.toml
src/lqusers.toml
src/dist
# Ignore Rust build artifacts
src/rust/target