Uninstall script initial commit

This commit is contained in:
Zach Levine 2020-01-29 09:08:23 -08:00
parent c4082118f2
commit 764cc066d8
2 changed files with 17 additions and 1 deletions

View File

@ -15,4 +15,5 @@ sudo chmod +x /etc/init.d/listen-for-shutdown.sh
sudo update-rc.d listen-for-shutdown.sh defaults
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!"

15
script/uninstall Normal file
View File

@ -0,0 +1,15 @@
#! /bin/sh
set -e
cd "$(dirname "$0")/.."
echo "=> Stopping shutdown listener...\n"
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!"