Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for initial release #13

Merged
merged 3 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Update the up-config configuration utility.

___

(C) [NysosTech e.U.](https://nysos.net) 2023
(C) [NysosTech e.U.](https://nysos.net) 2024
6 changes: 5 additions & 1 deletion conf/pi-hole/clean-ftl.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
DELETE FROM "query_storage";
DELETE FROM "sqlite_sequence" WHERE "name"='query_storage';
DELETE FROM "client_by_id";
DELETE FROM "domain_by_id";
DELETE FROM "network";
DELETE FROM "network_addresses";
DELETE FROM "network_addresses";
DELETE FROM "message";
DELETE FROM "sqlite_sequence" WHERE "name"='message';
UPDATE counters SET value = 0;
4 changes: 2 additions & 2 deletions lib/up-config.functions
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ function load_system_information() {

local default_network_device
default_network_device=$(ip -4 route ls | grep default | tail -1 | grep -Po '(?<=dev )(\S+)')
current_ip_v4=$(ip -4 addr show dev "$default_network_device" | awk '/inet/ {print $2}' | cut -d'/' -f1)
current_ip_v4=$(ip -4 addr show dev "$default_network_device" | awk '/inet/ {print $2; exit}' | cut -d'/' -f1)
current_netmask_v4=$(ip -4 addr show dev "$default_network_device" | awk '/inet/ {print $2}' | cut -d'/' -f2)
current_gateway_v4=$(ip -4 route ls | grep default | tail -1 | grep -Po '(?<=via )(\S+)')

if ip -6 route ls | grep default &>/dev/null; then
current_ip_v6=$(ip -6 addr show dev "$default_network_device" | awk '/inet/ {print $2}' | cut -d'/' -f1)
current_netmask_v6=$(ip -6 addr show dev "$default_network_device" | awk '/inet/ {print $2}' | cut -d'/' -f2)
current_netmask_v6=$(ip -6 addr show dev "$default_network_device" | awk '/inet/ {print $2; exit}' | cut -d'/' -f2)
current_gateway_v6=$(ip -6 route ls | grep default | tail -1 | grep -Po '(?<=via )(\S+)')
ip_v6=true
fi
Expand Down