-
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
Conversation
…le, systemd write paths, robust healthcheck
Leitfaden für Prüfer (bei kleinen PRs eingeklappt)Leitfaden für PrüferVerfeinert das Installer-Skript durch Bereinigung des Kommentarstils, Behebung der Resolver-Erkennung, Standardisierung des Unbound-Heredocs und Hinzufügen einer Syntaxvalidierung mit einem Ausführungs-Stub. Sequenzdiagramm für verbesserte systemd-resolved-Handhabung im InstallersequenceDiagram
participant Script
participant Systemd
Script->>Systemd: Prüfe, ob systemd-resolved.service existiert
alt Dienst existiert und ist aktiv
Script->>Systemd: Stoppe systemd-resolved
else Dienst nicht aktiv oder nicht vorhanden
Script-->>Systemd: Keine Aktion
end
Flussdiagramm für aktualisierte Installer-Ausführung und -Validierungflowchart TD
A["Benutzer führt install.sh aus"] --> B["Skript führt Syntaxprüfung durch: bash -n install.sh"]
B -->|Wenn Syntax OK| C["Skript wird ausgeführt: ./install.sh"]
B -->|Wenn Syntaxfehler| D["Fehler: Syntax ungültig"]
Änderungen auf Dateiebene
Tipps und BefehleInteraktion mit Sourcery
Ihre Erfahrung anpassenGreifen Sie auf Ihr Dashboard zu, um:
Hilfe erhalten
Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideRefines the installer script by cleaning up comment styling, fixing resolver detection, standardizing the Unbound heredoc, and adding syntax validation with an execution stub. Sequence diagram for improved systemd-resolved handling in installersequenceDiagram
participant Script
participant Systemd
Script->>Systemd: Check if systemd-resolved.service exists
alt Service exists and is active
Script->>Systemd: Stop systemd-resolved
else Service not active or not present
Script-->>Systemd: No action
end
Flow diagram for updated installer execution and validationflowchart TD
A["User runs install.sh"] --> B["Script performs syntax check: bash -n install.sh"]
B -->|If syntax OK| C["Script executes: ./install.sh"]
B -->|If syntax error| D["Error: Syntax invalid"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hallo - Ich habe deine Änderungen überprüft und sie sehen großartig aus!
Prompt für KI-Agenten
Bitte beachte die Kommentare aus dieser Code-Überprüfung:
## Einzelne Kommentare
### Kommentar 1
<location> `install.sh:293` </location>
<code_context>
show_summary
}
main "$@"
+SCRIPT
+
+# Syntax prüfen & ausführen
</code_context>
<issue_to_address>
**issue:** Die Ergänzung von '+SCRIPT' scheint eine überflüssige Zeile zu sein.
Bitte entferne diese Zeile, um Verwirrung oder unbeabsichtigtes Verhalten zu vermeiden.
</issue_to_address>
### Kommentar 2
<location> `install.sh:296-297` </location>
<code_context>
+SCRIPT
+
+# Syntax prüfen & ausführen
+sudo bash -n install.sh && echo "Syntax OK"
+sudo ./install.sh
</code_context>
<issue_to_address>
**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.
</issue_to_address>
### Kommentar 3
<location> `install.sh:154-157` </location>
<code_context>
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
</code_context>
<issue_to_address>
**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.
```suggestion
cat > /etc/unbound/unbound.conf.d/pi-hole.conf <<'UNBOUND_EOF'
server:
interface: 127.0.0.1
port: $UNBOUND_PORT
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
```
</issue_to_address>Sourcery ist kostenlos für Open Source – wenn Ihnen unsere Bewertungen gefallen, denken Sie bitte darüber nach, sie zu teilen ✨
Original comment in English
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `install.sh:293` </location>
<code_context>
show_summary
}
main "$@"
+SCRIPT
+
+# Syntax prüfen & ausführen
</code_context>
<issue_to_address>
**issue:** The addition of '+SCRIPT' appears to be a stray line.
Please remove this line to prevent confusion or unintended behavior.
</issue_to_address>
### Comment 2
<location> `install.sh:296-297` </location>
<code_context>
+SCRIPT
+
+# Syntax prüfen & ausführen
+sudo bash -n install.sh && echo "Syntax OK"
+sudo ./install.sh
</code_context>
<issue_to_address>
**issue (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.
</issue_to_address>
### Comment 3
<location> `install.sh:154-157` </location>
<code_context>
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
</code_context>
<issue_to_address>
**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.
```suggestion
cat > /etc/unbound/unbound.conf.d/pi-hole.conf <<'UNBOUND_EOF'
server:
interface: 127.0.0.1
port: $UNBOUND_PORT
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
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| show_summary | ||
| } | ||
| main "$@" | ||
| SCRIPT |
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.
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 English
issue: The addition of '+SCRIPT' appears to be a stray line.
Please remove this line to prevent confusion or unintended behavior.
| sudo bash -n install.sh && echo "Syntax OK" | ||
| sudo ./install.sh |
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.
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 English
issue (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.
| 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 |
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.
| 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 | |
| cat > /etc/unbound/unbound.conf.d/pi-hole.conf <<'UNBOUND_EOF' | |
| server: | |
| interface: 127.0.0.1 | |
| port: $UNBOUND_PORT | |
| 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 |
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.
| 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 | |
| cat > /etc/unbound/unbound.conf.d/pi-hole.conf <<'UNBOUND_EOF' | |
| server: | |
| interface: 127.0.0.1 | |
| port: $UNBOUND_PORT | |
| 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 |
Zusammenfassung von Sourcery
Installationsskript verfeinern durch Behebung der Dienst-Erkennung und des Konfigurations-Renderings, Vereinfachung von Kommentaren sowie Integration von Syntaxprüfungen und Ausführung.
Fehlerbehebungen:
systemd-resolvedDienst-Erkennungs-Regex im InstallationsskriptVerbesserungen:
Original summary in English
Summary by Sourcery
Refine installer script by fixing service detection and configuration rendering, simplifying comments, and integrating syntax checks and execution.
Bug Fixes:
Enhancements: