mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add omarchy-doctor checks
This commit is contained in:
21
install/checks/firewall.sh
Normal file
21
install/checks/firewall.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
OMARCHY_DESCRIPTION="Firewall Configuration"
|
||||
|
||||
omarchy_verify() {
|
||||
# Check if UFW is enabled
|
||||
sudo ufw status | grep -q "Status: active" || add_error "UFW firewall not active"
|
||||
|
||||
# Check if UFW service is enabled
|
||||
systemctl is-enabled ufw &>/dev/null || add_error "UFW service not enabled"
|
||||
|
||||
# Check default policies - they're on one line as "Default: deny (incoming), allow (outgoing), deny (routed)"
|
||||
sudo ufw status verbose | grep -q "Default:.*deny (incoming)" || add_error "UFW default incoming policy not set to deny"
|
||||
sudo ufw status verbose | grep -q "Default:.*allow (outgoing)" || add_error "UFW default outgoing policy not set to allow"
|
||||
|
||||
# Check specific rules are present
|
||||
sudo ufw status numbered | grep -q "53317/udp" || add_error "LocalSend UDP port 53317 not allowed"
|
||||
sudo ufw status numbered | grep -q "53317/tcp" || add_error "LocalSend TCP port 53317 not allowed"
|
||||
sudo ufw status numbered | grep -q "22/tcp" || add_error "SSH port 22 not allowed"
|
||||
|
||||
# Check Docker DNS rule
|
||||
sudo ufw status numbered | grep -q "allow-docker-dns" || add_error "Docker DNS rule not configured"
|
||||
}
|
||||
9
install/checks/gnome-theme.sh
Normal file
9
install/checks/gnome-theme.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
OMARCHY_DESCRIPTION="GNOME Theme Settings"
|
||||
|
||||
omarchy_verify() {
|
||||
gsettings get org.gnome.desktop.interface gtk-theme &>/dev/null || add_error "Cannot access GTK theme setting"
|
||||
gsettings get org.gnome.desktop.interface color-scheme &>/dev/null || add_error "Cannot access color scheme setting"
|
||||
gsettings get org.gnome.desktop.interface icon-theme &>/dev/null || add_error "Cannot access icon theme setting"
|
||||
|
||||
[[ -d /usr/share/icons ]] || add_error "Icon themes directory missing"
|
||||
}
|
||||
13
install/checks/power-profiles.sh
Normal file
13
install/checks/power-profiles.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
OMARCHY_DESCRIPTION="Power Profile & Battery Settings"
|
||||
|
||||
omarchy_verify() {
|
||||
if ls /sys/class/power_supply/BAT* &>/dev/null; then
|
||||
current_profile=$(powerprofilesctl get 2>/dev/null)
|
||||
[[ "$current_profile" == "balanced" ]] || add_error "Power profile not set to balanced for battery device"
|
||||
|
||||
systemctl --user is-enabled omarchy-battery-monitor.timer &>/dev/null || add_error "Battery monitor timer not enabled"
|
||||
else
|
||||
current_profile=$(powerprofilesctl get 2>/dev/null)
|
||||
[[ "$current_profile" == "performance" ]] || add_error "Power profile not set to performance for AC device"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user