Fix running init.sh in non root user

This commit is contained in:
Christer Warén
2025-06-28 14:32:30 +03:00
parent 03bba2ba7f
commit fb9ca30bf5
2 changed files with 7 additions and 4 deletions

View File

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