So, I wanted this to download a file from my computer, transfer it to my iPhone, install the file there, and respring my phone. For some reason the error you saw in the title pops up. Would be nice if someone could help, thanks.
#!/bin/bash
clear
cd downloads
if [ ! -d ".tmpdl" ]; then
mkdir ".tmpdl"
fi
cd .tmpdl
echo "Enter .deb link:"
read dllink
echo "Enter name of tweak (simple):"
read name
echo "Enter IP of device:"
read IP
echo "Enter your SSH password. If you don't know what this is enter 'alpine' without the apostrophes."
read pass
echo "Sending test file..."
touch test.txt
sshpass -p "$pass" scp test.txt root@"$IP":/var/mobile/Documents
echo "If the transfer was successful (no permission denied error) enter yes or no if it wasn't."
read reply1
if [ $reply1 == no ]; then
echo "Error, wrong credentials, try again."
exit
fi
echo "Okay, attempting to download file..."
curl -o "$name".deb "$dllink"
if [ ! -d "tmp" ]; then
sshpass -p "$pass" ssh root@"$IP" << EOF
cd /
cd var/mobile/Documents
mkdir tmp
EOF
fi
sshpass -p "$pass" scp "$name".deb root@192.168.1.104:/var/mobile/Documents/tmp
echo "Sent file, deleting it from here..."
cd ..
rm -rf .tmpdl
sshpass -p "$pass" ssh root@"$IP" << EOF
cd /
cd var/mobile/Documents
mkdir tmp
mv "$name".deb tmp/
cd tmp
dpkg -i "$name".deb
echo "Clearing caches..."
cd ..
rm -rf tmp
echo "Done installing, respringing now..."
killall backboardd
EOF