-
Notifications
You must be signed in to change notification settings - Fork 1
fix/installer and doc #18
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ warn() { echo -e "${YELLOW}[⚠]${NC} $*"; } | |
| error() { echo -e "${RED}[✗]${NC} $*"; } | ||
| step() { echo -e "\n${YELLOW}[STEP]${NC} $*"; } | ||
|
|
||
| # 🛡️ Error handler | ||
| # 🛡 Error handler | ||
| trap 'error "Installation failed. See logs above."; exit 1' ERR | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
|
|
@@ -65,7 +65,7 @@ handle_systemd_resolved() { | |
| # shellcheck disable=SC1091 | ||
| . /etc/os-release | ||
| if [[ "${ID:-}" == ubuntu* || "${ID_LIKE:-}" == *ubuntu* ]]; then | ||
| if systemctl list-unit-files | grep -q '^systemd-resolved\\.service'; then | ||
| if systemctl list-unit-files | grep -q '^systemd-resolved\.service'; then | ||
| if systemctl is-active --quiet systemd-resolved; then | ||
| warn "systemd-resolved is active; stopping to free port 53" | ||
| systemctl stop systemd-resolved || true | ||
|
|
@@ -129,7 +129,7 @@ configure_unbound() { | |
| install -d -m 0755 /var/lib/unbound | ||
| curl -fsSL https://www.internic.net/domain/named.root -o /var/lib/unbound/root.hints | ||
|
|
||
| cat > /etc/unbound/unbound.conf.d/pi-hole.conf <<'UNBOUND_EOF' | ||
| cat > /etc/unbound/unbound.conf.d/pi-hole.conf <<EOF | ||
| server: | ||
| interface: 127.0.0.1 | ||
| port: $UNBOUND_PORT | ||
|
|
@@ -154,7 +154,7 @@ forward-zone: | |
| forward-addr: 9.9.9.9@853#dns.quad9.net | ||
| forward-addr: 149.112.112.112@853#dns.quad9.net | ||
| # NOTE: This is DoT forwarding to Quad9 (not full recursion to the root); intended. | ||
| UNBOUND_EOF | ||
| EOF | ||
|
|
||
| unbound-anchor -a /var/lib/unbound/root.key || true | ||
| systemctl enable --now unbound | ||
|
|
@@ -290,3 +290,8 @@ main() { | |
| show_summary | ||
| } | ||
| main "$@" | ||
| SCRIPT | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: Die Ergänzung von '+SCRIPT' scheint eine überflüssige Zeile zu sein. Bitte entferne diese Zeile, um Verwirrung oder unbeabsichtigtes Verhalten zu vermeiden. Original comment in Englishissue: The addition of '+SCRIPT' appears to be a stray line. Please remove this line to prevent confusion or unintended behavior. |
||
|
|
||
| # Syntax prüfen & ausführen | ||
| sudo bash -n install.sh && echo "Syntax OK" | ||
| sudo ./install.sh | ||
|
Comment on lines
+296
to
+297
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Das Ausführen von 'sudo bash -n install.sh' und anschließend 'sudo ./install.sh' kann dazu führen, dass sich das Skript rekursiv selbst ausführt. Wenn das Ziel darin besteht, ein anderes Skript zu validieren und auszuführen, gib bitte den korrekten Dateinamen an, um Rekursion oder unbeabsichtigtes Verhalten zu vermeiden. Original comment in Englishissue (bug_risk): Running 'sudo bash -n install.sh' and then 'sudo ./install.sh' may cause the script to execute itself recursively. If the goal is to validate and run a different script, please specify the correct file name to avoid recursion or unintended behavior. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (bug_risk): Das Umschalten von einem zitierten Heredoc zu einem nicht zitierten kann zu Variablenerweiterung führen.
Das vorherige zitierte Heredoc verhinderte die Variablenerweiterung; die neue nicht zitierte Version wird Variablen wie $UNBOUND_PORT erweitern. Bestätige, dass diese Änderung beabsichtigt ist und alle Variablen gesetzt sind, oder kehre zum zitierten Heredoc zurück, um unbeabsichtigte Substitutionen zu vermeiden.
Original comment in English
suggestion (bug_risk): Switching from a quoted heredoc to an unquoted one may cause variable expansion.
The previous quoted heredoc prevented variable expansion; the new unquoted version will expand variables like $UNBOUND_PORT. Confirm this change is intentional and all variables are set, or revert to the quoted heredoc to avoid unintended substitutions.