Update chroot scripts

This commit is contained in:
ItsDrike 2021-07-15 16:15:45 +02:00
parent b4e3bf49c8
commit f5980c3e1a
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
3 changed files with 122 additions and 22 deletions

View file

@ -0,0 +1,17 @@
#!/bin/sh
if [ $# -ge 1 ]; then
if ! id "$1" &>/dev/null; then
echo "No such user, give valid username"
else
USERNAME="$1"
fi
else
USERNAME="root"
fi
source /etc/profile
exec su "$USERNAME" --login
exit