From d01cbcdfe6db26daa9109ba766a4cbfdbd3d4419 Mon Sep 17 00:00:00 2001 From: Ravi Shah <63246200+Rav4s@users.noreply.github.com> Date: Sat, 31 Oct 2020 10:50:52 -0500 Subject: [PATCH] Update install.sh with automatic rc.local editing --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 9a66440..a86b4b2 100644 --- a/install.sh +++ b/install.sh @@ -22,7 +22,7 @@ then wget https://raw.githubusercontent.com/Rav4s/Pi-Garage-Door-Opener/master/Python_script_for_garage_door.py sleep 0.5 echo "Editing /etc/rc.local for auto startup..." - sudo sed -i 'x; ${s/.*/python3 /home/pi/Python_script_for_garage_door.py &/;p;x}; 1d' /etc/rc.local + tac /etc/rc.local | sed '2 s@.*@python3 /home/pi/garagedoor/Python_script_for_garage_door.py &@' | tac sleep 0.5 echo "Successful install! Rebooting in 5 seconds!" sleep 5