I have a Python script running at boot, on a Raspberry Pi, and of course I didn't write down how I set it up. Now I need to change it, and I can't for the life of me figure out how it's getting launched. How can I figure this out?
I've searched for methods to launch a script at boot, in the hopes that I will stumble across the right one. For instance, Run a Program On Your Raspberry Pi At Startup gives several options, and I've gone through each of them, to walk through the setup, and see if I already changed the settings. None of them seem to be what I did.
/etc/rc.local
is pretty empty- It's not in
~/.bashrc
(and I wouldn't want it to be — I want it to run at boot, not when I log in) - As far as I can tell, it's not in
/etc/init.d/
, but I suppose the launcher script could be named something that I'm not expecting? - It's not set up as a
systemd
service (Again, as far as I can tell — maybe I named it something weird?) - There are no
crontab
entries
If I search running processes, I get this:
$ ps aux | grep python
root 452 0.0 0.0 1912 396 ? Ss 12:18 0:00 /bin/sh -c sudo python /home/pi/tikinook/nook_controller.py
root 453 0.0 0.3 6968 3228 ? S 12:18 0:00 sudo python /home/pi/tikinook/nook_controller.py
root 486 11.7 3.7 110344 35912 ? Sl 12:18 0:04 python /home/pi/tikinook/nook_controller.py
pi 1205 0.0 0.2 4280 1948 pts/0 S+ 12:19 0:00 grep --color=auto python
nook_controller.py
is definitely the right Python script, and I'm guessing the /bin/sh
means it's being run from a shell script… but I am still at a loss of where that shell script lives. Any ideas what my next steps would be to track this down?