forked from ahurac/dotfiles
Correction : les arguments n'étaient pas correctement passés
This commit is contained in:
parent
d7a948723f
commit
6c092c3c07
1 changed files with 5 additions and 3 deletions
|
@ -1,14 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec_user() {
|
||||
if [ "$USER" != "$1" ]; then
|
||||
exec sudo -u "$1" "$0" "$@"
|
||||
local user="$1"
|
||||
shift
|
||||
if [ "$USER" != "$user" ]; then
|
||||
exec sudo -u "$user" "$0" "$@"
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
exec_user minecraft
|
||||
exec_user minecraft "$@"
|
||||
|
||||
cd ~/bin || exit
|
||||
|
||||
|
|
Loading…
Reference in a new issue