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
|
#!/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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue