Password can be set in environment
@@ -14,6 +14,10 @@ if [ "$PORT" == "" ]; then
PORT=22
fi
+if [ "$PASSWORD" == "" ]; then
+ PASSWORD=hifiberry
+fi
+
#VERSION=`sshpass -p 'hifiberry' ssh -p $PORT root@$HOST cat /etc/raspberrypi.version`
echo "Updating $HOST with Pi$VERSION release"
@@ -21,7 +25,7 @@ echo "Updating $HOST with Pi$VERSION release"
./create-image $VERSION
IMG=`ls images/ | grep updater | grep pi$VERSION | tail -1`
echo "Updating $HOST with $IMG"
-sshpass -p 'hifiberry' scp -P $PORT images/$IMG root@$HOST:/data/updater.tar.gz;
-sshpass -p 'hifiberry' ssh -p $PORT root@$HOST /opt/hifiberry/bin/extract-update --reboot
+sshpass -p "$PASSWORD" scp -P $PORT images/$IMG root@$HOST:/data/updater.tar.gz;
+sshpass -p "$PASSWORD" sh -p $PORT root@$HOST /opt/hifiberry/bin/extract-update --reboot
