Solved recalbox external startscript do not start
-
Hello,
I try to execute an external startscript.What I tried is to edit
nano /recalbox/share/system/custom.shand place there my script.
If I execute ./custom.sh in shell it starts and I see the proceses in "top"
and the script works. After rebooting I can't see the proceses in "top"
I tried to switch order in /etc/init.d and move S99custom to S31custom or S04 custom
but after reboot nothing happens. If I execute ./S04custom manually it starts and all looks good.Places I already checked while trying to solve my problem
https://github.com/recalbox/recalbox-os/wiki/Add-your-own-startup-script-(EN)
https://forum.recalbox.com/topic/4370/help-with-starting-an-automatic-script-on-start-up
but didn't work for me.Why is my startscript not executing on start?
Any idears? -
chmod u+x ~/custom.sh
? -
~/custom.sh is set to 755 owner avahi:root
the script in custom.sh is following:
#################################################
#!/bin/sh
#/recalbox/share/system/custom.sh
cd
cd StromPi2
python powershutdown.py &
python poweralarm.py &################################################
The rest of this works if I start it manually. The reason for this is that this way I could turn of my physical power switch and my pi shutdown with a little battery himself.
I'll keep on searching and hope I will get it to work but thx @Substring
-
@rapid
chown root ~/custom.sh
because i don't see any reason why any script should belong to avahi
Don'tcd
in a init script, you should be explicit on the path because $HOME can be unset at init. So justcd
is probably in /usr/bin, you'd bettercd /recalbox/share/system/StormPi2
-
Ok. Shame on me
To make a long storry short.
This works. Thx a lot. @SubstringIt's been a while since I made scripts, so I just tried it the "old dos" way...
So it's solved (still searching the button for solved)
-
i know this post is old but i was looking for this to run my LED buttons when PI is booting. Finally i managed to get it working
I copy the script file in "/recalbox/share/system" then i fallow Substring recommendation
my custom scrypt is looking like this:
#################################################
#!/bin/sh
#/recalbox/share/system/custom.sh
cd /recalbox/share/system/
python relay1.py&################################################