mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
refactor: pr feedback - ufw
This commit is contained in:
committed by
Martin Mose Hansen
parent
0723059fb3
commit
136a2268ea
@@ -1,13 +1,11 @@
|
|||||||
echo "Enable UFW systemd service for existing installations"
|
echo "Enable UFW systemd service for existing installations"
|
||||||
|
|
||||||
# Check if UFW is installed and configured but systemd service not enabled
|
if omarchy-cmd-present ufw; then
|
||||||
if command -v ufw >/dev/null 2>&1; then
|
if sudo ufw status | grep -q "Status: active\|22/tcp\|53317"; then
|
||||||
# Check if UFW has rules configured (indicating it was set up by Omarchy)
|
if ! systemctl is-enabled ufw >/dev/null 2>&1; then
|
||||||
if sudo ufw status | grep -q "Status: active\|22/tcp\|53317"; then
|
sudo systemctl enable ufw --now
|
||||||
# Enable UFW systemd service if not already enabled
|
echo "UFW systemd service enabled"
|
||||||
if ! systemctl is-enabled ufw >/dev/null 2>&1; then
|
fi
|
||||||
sudo systemctl enable ufw
|
|
||||||
echo "UFW systemd service enabled"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user