feat: add install unreal mcp script

This commit is contained in:
Krzysztof Rudnicki 2025-11-06 20:24:19 +01:00
parent fef44f0015
commit 5a34d9aae4
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,8 @@
#!/usr/bin/env bash
# Post-transaction hook to re-apply hosts guard protections (single-layer ro bind)
set -euo pipefail
TARGET=/etc/hosts
ENFORCE=/usr/local/sbin/enforce-hosts.sh
LOGTAG=hosts-guard-hook
@ -8,7 +10,7 @@ LOGTAG=hosts-guard-hook
mount_layers_count() { awk '$5=="/etc/hosts"{c++} END{print c+0}' /proc/self/mountinfo 2> /dev/null || echo 0; }
collapse_mounts() {
local i=0
if command -v mountpoint > /devnull 2>&1; then
if command -v mountpoint > /dev/null 2>&1; then
while mountpoint -q "$TARGET"; do
umount -l "$TARGET" > /dev/null 2>&1 || break
i=$((i + 1))

View File

@ -1,6 +1,8 @@
#!/usr/bin/env bash
# Non-interactive pre-transaction hook to temporarily unlock /etc/hosts
set -euo pipefail
TARGET=/etc/hosts
LOGTAG=hosts-guard-hook