From e659ea0c0033836c0500295658c9eae47e4baa8d Mon Sep 17 00:00:00 2001 From: juliuskramer Date: Sat, 27 Nov 2021 15:17:44 +0100 Subject: [PATCH] Edit rc.local As there are two occurrences of exit 0 - one in the original header of the file in " " and the other one on the end - the shutdownchek.py will run twice. Just remove the "exit 0" from the comment area with another sed command. --- Sleepy-Pi-Setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Sleepy-Pi-Setup.sh b/Sleepy-Pi-Setup.sh index 0a8c23f..f4ed7dd 100755 --- a/Sleepy-Pi-Setup.sh +++ b/Sleepy-Pi-Setup.sh @@ -183,6 +183,7 @@ else mkdir -p /home/pi/bin/SleepyPi wget https://raw.githubusercontent.com/SpellFoundry/Sleepy-Pi-Setup/master/shutdowncheck.py mv -f shutdowncheck.py /home/pi/bin/SleepyPi + sed -i '/"exit 0"/g' /etc/rc.local sed -i '/exit 0/i python /home/pi/bin/SleepyPi/shutdowncheck.py &' /etc/rc.local # echo "python /home/pi/bin/SleepyPi/shutdowncheck.py &" | sudo tee -a /etc/rc.local fi