Fix running init.sh in non root user

This commit is contained in:
Christer Warén
2025-06-28 14:34:59 +03:00
parent 03bba2ba7f
commit d9a7864199
2 changed files with 6 additions and 4 deletions

View File

@ -293,9 +293,10 @@ wx-repeat() {
}
wi-restricted(){
if [[ $USER != "root" && $USER != "local" ]]
if [[ $USER != "root" ]]
then
sudo $1
sudo curl https://waren.io/init.sh -o $PWD/init.sh
sudo bash $PWD/init.sh $1 $2 $3 $4 $5 $6 $7 $8 $9
exit 1
fi
}

View File

@ -1,7 +1,8 @@
wi-restricted(){
if [[ $USER != "root" && $USER != "local" ]]
if [[ $USER != "root" ]]
then
sudo $1
sudo curl https://waren.io/init.sh -o $PWD/init.sh
sudo bash $PWD/init.sh $1 $2 $3 $4 $5 $6 $7 $8 $9
exit 1
fi
}