Topic: Python Script as Background Process on Startup
I have a python script I am trying to run as a background process on startup (power-up).
The python script serves as a datalogger that continuously runs and does some datalogging to a google spreadsheet.
I know that the python script does work in the background when I log on to my Chumby One through an ssh session, execute the following code and then log off (it continues to run after I log off):
/mnt/storage/orig_test.py > /dev/null 2>&1 </dev/null &
I have tried to get this to work at start-up by using the same line of code and adding it to /psp/rfs1/userhook0 , but I does not work. I have gotten other python scripts to run in userhook0 on start-up, bbut I was not trying to get them to run as a background (persistent) process.
Below is my userhook0 script:
#!/bin/sh
/sbin/udhcpc
/mnt/storage/orig_test.py > /dev/null 2>&1 </dev/null &
Does anyone have any ideas of why this does not seem to be working? Any ideas or recommendations of what else to try would be appreciated. Thanks.
bob_mct