Merge pull request #14 from Howchoo/feature/uninstall-script
Feature/uninstall script
This commit is contained in:
commit
26fb7dcc60
|
@ -8,4 +8,8 @@ Scripts used in our official [Raspberry Pi power button guide](https://howchoo.c
|
||||||
1. Clone this repo: `git clone https://github.com/Howchoo/pi-power-button.git`
|
1. Clone this repo: `git clone https://github.com/Howchoo/pi-power-button.git`
|
||||||
1. Run the setup script: `./pi-power-button/script/install`
|
1. Run the setup script: `./pi-power-button/script/install`
|
||||||
|
|
||||||
That's it!
|
## Uninstallation
|
||||||
|
|
||||||
|
If you need to uninstall the power button script in order to use GPIO3 for another project or something:
|
||||||
|
|
||||||
|
1. Run the uninstall script: `./pi-power-button/script/uninstall`
|
|
@ -15,4 +15,5 @@ sudo chmod +x /etc/init.d/listen-for-shutdown.sh
|
||||||
sudo update-rc.d listen-for-shutdown.sh defaults
|
sudo update-rc.d listen-for-shutdown.sh defaults
|
||||||
sudo /etc/init.d/listen-for-shutdown.sh start
|
sudo /etc/init.d/listen-for-shutdown.sh start
|
||||||
|
|
||||||
echo "Shutdown listener installed."
|
echo "Shutdown listener installed.\n"
|
||||||
|
echo "Check out howchoo.com for more awesome Pi projects!"
|
|
@ -0,0 +1,16 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
echo "=> Stopping shutdown listener...\n"
|
||||||
|
sudo update-rc.d listen-for-shutdown.sh remove
|
||||||
|
sudo /etc/init.d/listen-for-shutdown.sh stop
|
||||||
|
|
||||||
|
echo "=> Removing shutdown listener...\n"
|
||||||
|
sudo rm -rf /usr/local/bin/listen-for-shutdown.py
|
||||||
|
sudo rm -rf /etc/init.d/listen-for-shutdown.sh
|
||||||
|
|
||||||
|
echo "Shutdown listener uninstalled.\n"
|
||||||
|
echo "Check out howchoo.com for more awesome Pi projects!"
|
Loading…
Reference in New Issue