From ed880e751d9fd2430cd44bf95cfcd276ac7b285b Mon Sep 17 00:00:00 2001 From: Nebula Date: Thu, 29 Sep 2022 13:16:59 -0400 Subject: [PATCH] run iproxy as sudo on linux --- palera1n.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/palera1n.sh b/palera1n.sh index ff0ebbb..5d964b3 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -284,7 +284,12 @@ if [ ! -f blobs/"$deviceid"-"$version".shsh2 ]; then # Execute the commands once the rd is booted _usb_fix - "$dir"/iproxy 2222 22 &> /dev/null >> "$out" & + if [ ! "$os" = 'Linux' ]; then + sudo "$dir"/iproxy 2222 22 &> /dev/null >> "$out" & + else + "$dir"/iproxy 2222 22 &> /dev/null >> "$out" & + fi + if ! ("$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "echo connected" &> /dev/null > "$out"); then echo "[*] Waiting for the ramdisk to finish booting" fi @@ -323,7 +328,7 @@ if [ ! -f blobs/"$deviceid"-"$version".shsh2 ]; then sleep 2 "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/sbin/reboot" > "$out" sleep 1 - killall iproxy + _kill_if_running iproxy _wait normal sleep 2