Browse Source
Update install.sh with automatic rc.local editing
pull/3/head
Ravi Shah
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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 |
|
|
|
|