rcoodey / Pilarm

Integrate existing door or window contact sensors with SmartThings using a Raspberry Pi or C.H.I.P.
Apache License 2.0
7 stars 5 forks source link

Script not launching on reboot #5

Closed the-sambot closed 7 years ago

the-sambot commented 7 years ago

I chmod 755 both the .py and the .sh. I added to rc.local: /home/pi/Pilarm/PilarmServer.sh printf "Pil8arm started"

The readme says to add: /home/pi/PilarmServer.sh

But my files are located in the /home/pi/Pilarm/ folder. I reboot and no PilarmServerReboot.log is created. However, if I manually issue the command "sudo /home/pi/Pilarm/PilarmServer.sh" it creates the file and everything works. If I leave off don't use sudo I get permission errors trying to create the log.

the-sambot commented 7 years ago

Figured it out. In my rc.local I was specifying my gpio as I had done previously, which was working: /usr/local/bin/gpio export 18 in /usr/local/bin/gpio edge 18 both

However, for some reason, that was no longer working (figured it out when I tried to manually launch /etc/rc.local). I got rid of /usr/local/bin/ and instead just specified gpio export 18 in gpio edge 18 both

Fixed my problem Script launches now.