You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This doesn't always happen, sometimes it runs properly after reboot, and sometimes the files are not uploaded after camera reboots because the script fails to run with the following error.
The text was updated successfully, but these errors were encountered:
The jq program file is located in path /tmp/sd/yi-hack/sbin or /home/yi-hack/bin/jq, however, I checked the env variable $PATH when the uploader script runs after each reboot, it has different situations:
For a successful run, the $PATH contains jq file path inside
When it runs into the errors above, the $PATH doesn't show jq file path /sbin:/bin:/usr/sbin:/usr/bin:/home/base/wifi:/ext/bin:/home/base/tools:/home/app/localbin
Then the reason for this issue is the camera initialization progress is not always ready for the uploader script to run, and the env path of jq is not appended to the global variable PATH when the uploader script runs sometimes.
So the fix is to append the path of the programs uploader script depending on to the env variable PATH before they are called.
export PATH=$PATH:/tmp/sd/yi-hack/bin:/tmp/sd/yi-hack/sbin
or pause for a while to wait until the env is setup. sleep 30 # put this in startup.sh
The text was updated successfully, but these errors were encountered: