mooooore stuffs

This commit is contained in:
2026-04-11 00:26:51 -04:00
parent 6c728033f2
commit 128e85d98e
10 changed files with 184 additions and 6 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
USER="$1"
CONTAINER=$(cat "/home/${USER}/.lxc-container" 2>/dev/null)
# [[ -n "$CONTAINER" ]] && lxc-stop -n "$CONTAINER" 2>/dev/null; lxc-destroy -n "$CONTAINER"
if [[ -n "$CONTAINER" ]]; then
lxc-stop -n "$CONTAINER" 2>/dev/null
lxc-destroy -n "$CONTAINER"
fi
userdel -r "$USER" 2>/dev/null || true
echo "Removed ${USER} and ${CONTAINER}"