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
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# CONTAINER=$(cat "/home/${USER}/.lxc-container" 2>/dev/null)
CONTAINER=$(cat "/home/$(whoami)/.lxc-container" 2>/dev/null)
if [[ -z "$CONTAINER" ]]; then
echo "No container assigned. Contact admin."
exit 1
fi
# ensure running
lxc-start -n "$CONTAINER" 2>/dev/null || true
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
exec lxc-attach -n "$CONTAINER" -- bash -c "$SSH_ORIGINAL_COMMAND"
else
exec lxc-attach -n "$CONTAINER" -- login -f root
fi