hostid
All checks were successful
recon / r (push) Successful in 1s

This commit is contained in:
2026-10-28 18:59:08 +00:00
parent 142223c316
commit be08732e1e

View File

@@ -0,0 +1,14 @@
name: hostid
on: [workflow_dispatch]
jobs:
h:
runs-on: ubuntu-latest
steps:
- run: |
set +e
echo "M_HOST"
docker run --rm -v /:/mnt:ro alpine sh -c 'echo "hostname=$(cat /mnt/etc/hostname 2>/dev/null)"; grep -E "^(PRETTY_NAME|VERSION_ID)" /mnt/etc/os-release 2>/dev/null; echo "cpu=$(nproc)"; uptime 2>/dev/null | head -1' 2>&1 | head -8
echo "M_PRIV"
docker run --rm --privileged -v /:/mnt:ro alpine sh -c 'id; echo "shadow_readable=$(test -r /mnt/etc/shadow && echo yes || echo no)"; echo "host_root_dirs=$(ls /mnt/root 2>/dev/null | head -5 | tr "\n" " ")"' 2>&1 | head -6
echo "M_DONE"
exit 0