1
0
Fork 0
forked from ahurac/dotfiles

Correction : les arguments n'étaient pas correctement passés

This commit is contained in:
Hippolyte Chauvin 2023-07-04 20:35:11 +02:00
parent d7a948723f
commit 6c092c3c07

View file

@ -1,14 +1,16 @@
#!/bin/bash #!/bin/bash
exec_user() { exec_user() {
if [ "$USER" != "$1" ]; then local user="$1"
exec sudo -u "$1" "$0" "$@" shift
if [ "$USER" != "$user" ]; then
exec sudo -u "$user" "$0" "$@"
else else
return 0 return 0
fi fi
} }
exec_user minecraft exec_user minecraft "$@"
cd ~/bin || exit cd ~/bin || exit