I made a bash script to open a certain webpage after my Pi 2 has booted. To do so, I use Bash to read a file on my system containing an ID, and append it to an existing URL. This full URL then gets opened in a kiosk mode. The idea is that I can easily clone my SD card and only change 1 file to show a different page on different PIs, instead of changing it in the bash script.
When I run this script from the terminal, everything works fine. The file gets read, the url appended, and the right page is shown. However when it gets run from boot, the browser gets opened but the url without the appended ID gets shown.
What might cause the script from not reading the file on boot, but reading it fine from the terminal?
The script basically looks like this:
PICONTENT=$(<pi_id) #my file with the id
echo "The id is $PICONTENT"