the custom script does not run on boot after an upgrade from 7.02.7 to 7.03.2 and later.
If I manually run the script through the CLI it executes fine.
the script also executes fine when sent via SSH from a PC.
any help to get the script running on boot would be appreciated.
this is the script below
curl -X GET “http://192.168.2.1/cgi-bin/io_state?username=admin&password=48c96de04B&pin=dio1&state=on&delay=10”
curl -X GET “http://192.168.2.1/cgi-bin/io_state?username=admin&password=48c96de04B&pin=dio1&state=off&delay=10”
exit 0
Hello,
It is likely that ioman is not loaded by the time you execute the script. Could you try this:
(sleep 20 &&
curl -X GET “http://192.168.2.1/cgi-bin/io_state?username=admin&password=48c96de04B&pin=dio1&state=on&delay=10”
curl -X GET “http://192.168.2.1/cgi-bin/io_state?username=admin&password=48c96de04B&pin=dio1&state=off&delay=10”
) &
exit 0
Let me know if it works.
You may also try using ubus calls to manage I/Os. For example:
- ubus call ioman.gpio.dout1 status
- ubus call ioman.gpio.dout1 update ‘{“value”:“1”}’
To see available I/Os:
- ubus list | grep ioman
- ubus -v list ioman.gpio.dout1
Kind Regards,
Thank you Andzej,
You were right and the sleep command fixed the problem.
perhaps the developers could put a fix in a future firmware update to stop the custom script from running until all the system is stable and all services are running.
Best Regards