Fix running init.sh in non root user

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

View File

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

View File

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