Posts by evan

    Hi,


    I wanted a small profile NAS and made a 2 x 2.5inch hdd along with a acrylic enclosure using raspberry pi. I added a switch to reboot if button is pushed for 3-7s and shutdown if button pushed for more than 8s using python script. Made some changes to weakref.py after errors trying to install rpi.gpio package. Thankfully, I manage to install rpi.gpio package and run the script.


    If I ssh and run the script, it works perfectly. but I would like to run the script on boot. I tried adding "python3 /home/shutdown.py &" (also tried sudo python3 /home/shutdown.py &) in /etc/rc.local before exit 0 and also added in GUI scheduled job. However, the script does not run after reboot.


    I also tried "cd /home; python3 /home/shutdown.py" in gui and also in rc.local. Failed to work too.


    Any kind soul can offer some guidance. Thank you in advance!