PiSupply / Pi-Supply-Switch

Pi Supply Switch On/Off Switch for Raspberry Pi
https://www.pi-supply.com/product/pi-supply-raspberry-pi-power-switch/
Other
58 stars 17 forks source link

Improved Installation and Uninstall #5

Closed coconut147 closed 7 years ago

coconut147 commented 7 years ago

I added an uninstall script and improved the installation script. It does not rely on a remote script anymore.

francesco-vannini commented 7 years ago

Let me make a couple of changes then you could review your uninstall and create a PR for that?

coconut147 commented 7 years ago

Sure why not 👍

I do not prefer the "curl approach" as the shell script resides on a remote location and has to be run as super user. From an educational standpoint cloning a repo from github would be a nice idea.

But your version is easier to use for sure.

francesco-vannini commented 7 years ago

I get that but there are several commands within the script that need elevation anyway, you would end up needing to sudo for those right? The end goal is for us to make it as easy as possible and as full proof as possible. I guess it is always a tricky balance wanting to make things easy and providing an opportunity for people to learn something.

By all means go ahead with the uninstall part, really I should make one for each project, if anything it will come in handy for testing the installations ;)

Thanks again

On 10 January 2017 at 20:44, Freddy notifications@github.com wrote:

Sure why not 👍

I do not prefer the "curl approach" as the shell script resides on a remote location and has to be run as super user. From an educational standpoint cloning a repo from github would be a nice idea.

But your version is easier to use for sure.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PiSupply/Pi-Supply-Switch/pull/5#issuecomment-271692424, or mute the thread https://github.com/notifications/unsubscribe-auth/APUu16XvunNJFdC88DyKlFmniGOHb8W3ks5rQ-2UgaJpZM4Lfw8- .

-- Francesco Vannini

Website http://garagetech.tips LinkedIn https://uk.linkedin.com/in/garagetechlinkedin Youtube https://www.youtube.com/user/Happylotube Twitter @GarageTechTweet Facebook https://www.facebook.com/GarageTechBook/ https://m.facebook.com/GarageTechBook/ Google+ https://plus.google.com/+FrancescoVannini

coconut147 commented 7 years ago

👍

I'll create another PR tomorrow...

shawaj commented 7 years ago

Agreed that piping curl to bash from an unknown source is pretty bad practice. But it's also much easier for end users.

If you know of a way that's as easy, but safer, please let us know :-)

Thanks for your efforts though, much appreciated

coconut147 commented 7 years ago

I would go with a 3rd step.

  1. Login
  2. git clone
  3. execute install.sh

If you like to stay with the curl Approach - you could remove the unknown source and point directly to github. The command will look a little bit uncomfortable, but is much more transparent:

curl -sSL https://raw.githubusercontent.com/PiSupply/Pi-Supply-Switch/master/install.sh | sudo bash

EDIT: I just "discovered" that your provided link is a link shortener to the URL above and is much easier to type.