-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install trying to pull old file version? #15
Comments
Hi @Turnwise , AFAICT the install script uses
and the URL https://pisupp.ly/piswitchcode retrives the right version of install. Could you use a browser and verify that the version of install on the master branch is the same you get? Even just by running you should get: #!/usr/bin/env bash #Check if script is being run as root if [ ! $? = 0 ]; then PiSupplySwitchDir="Pi-Supply-Switch" mkdir /opt/piswitch cp $PiSupplySwitchDir/softshut.py /opt/piswitch systemctl enable /etc/systemd/system/piswitch.service |
The mirror director URL is something to do with the pi repos. Perhaps try sudo apt-get update and sudo apt-get upgrade too |
Thanks both :) I'm a bit of a beginner with Pi, and bash scripts etc, so bare with me please - in my day job I'm a PL-SQL developer, but we have a whole department to deal this the more tech side of setting stuff up, etc... francesco-vannini - Yes, I tried that and compared the install script that took me to against the code I can see just clicking on the install.sh code. All seems good until the script reaches the clone bit, then it can't find the version it's looking for - hence the 404 Not Found at that point? Thanks :) shawaj - "The mirror director URL is something to do with the pi repos" - that sounds possible - I will try your suggestions - I did think the whiptail bit probably did that, but not sure... I'll come back on this when I get chance to try it, Thanks :) For anyone interested - or who cares, here's the putty messages from running curl -sSL https://pisupp.ly/piswitchcode | sudo bash pi@raspberrypi:~ $ curl -sSL https://pisupp.ly/piswitchcode | sudo bash |
The
You need to edit /etc/apt/sources.list as root (using sudo). |
Out of curiosity @Turnwise how did you download your Raspbian version? is this a new installation or you are adding the Pi Supply Switch to an existing project which you had been sitting there for a while? |
Not sure exact date - but probably around a year or so ago - the on/off switch is to attach to my Pi that is running BrewPi for me (to control temperature in a fermentation cupboard). When it's running, it's out in my shed, only connected to an arduino board that's controlling a relay board - but no screen, or keyboard connected - and I've never managed to connect to the Pi remotely to shut it down gracefully, and 9 times out of 10 it corrupts if I just switch it off, which isn't a disaster as I have a saved image I just drop back on the SD card and off we go again, but it is a bit of a pain, especially as we are out in the sticks and power cuts are more frequent than I'd like, and although usually intermittent, also tend to mean a re-install of the image.... |
@Turnwise I'd follow @tvoverbeek advice and update the OS one way or another. Good luck and let us know how that goes. |
Thanks all :) I've followed @tvoverbeek 's advice :) I edited the sources list by navigating to it on Putty using the cd command and then edited using vi : I then ran the two updates recommended - both did a lot of work! However the dist-upgrade hit an error towards the end : Preparing to unpack .../libapt-pkg5.0_1.4.9_armhf.deb ... I ran the get update script again - it found nothing new to do, and then the upgrade again, but I got the same 'compressed data is corrupt' The curl -sSL https://pisupp.ly/piswitchcode | sudo bash now appears to do nothing at all, the cursor just moves to a new line and no action appears to be taken. Stepping through the individual items in the install script and running individually using sudo, I get as far as cp $PiSupplySwitchDir/softshut.py /opt/piswitch - and there I encounter : cp: cannot stat 'Pi-Supply-Switch/softshut.py': No such file or directory My Mrs has run out of patience waiting for me to finish mucking about with this tonight, so I'm gonna shut it down and come back to it another night!! Thanks all for your continued patience and support!!! |
@Turnwise Smells like you SD card is full, so adding anything new fails. |
Slightly over half full?? Filesystem Size Used Avail Use% Mounted on |
Ok, sd card is obviously not full. I seems you have installed Raspbian using NOOBS. |
I've ordered a new SD, and have downloaded the Raspbian Stretch with desktop, without NOOBS. I'll then see how that works! I'll be a week or so - the Pi was needed back for the BrewPi and is running with the old, but working image that has the BrewPi code and settings, but not the new switch.... fingers crossed there's no power cuts! |
@Turnwise Let us know how it goes. |
Using the command curl -sSL https://pisupp.ly/piswitchcode | sudo bash the install appears to be trying to get the older version of the piswitch code - deb9u2, when the most recent is d53ff4c I think?
The error is: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/g/git/git_2.11.0-3+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
The text was updated successfully, but these errors were encountered: