Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


enable gpio output when boot is complete
#11
(01-07-2024, 09:23 PM)Nutul Wrote:
(01-07-2024, 09:09 PM)Wallyboy Wrote: Can I run them as root within a script file?  Not sure how to do that.
Just prepend sudo to the command; although that rings a bell... about the "echo" thing...
Maybe it's better you include the three commands in a shell script, and then invoke the script with:

sudo ./yourscript.sh

although I am not sure if that would wait for the password... maybe making "root" the script owner, and then setting its sticky flag would have better chances of running.

I'm having no luck with the sh script.  I would rather use a python script but I cannot figure out how to do the moodeutl test as described above..  I have attached the code snippet below as suggested for the sh script.  Anyone know how to implement this in python? 
Code:
until test $(moodeutl -q "select value from cfg_system where param='wrkready'") = "1"; do
Reply


Messages In This Thread
RE: enable gpio output when boot is complete - by Wallyboy - 01-08-2024, 09:18 PM

Forum Jump: