I have created the following script:
#!/bin/bash
cd /home/pi/workspace/my-app
/usr/bin/git pull
python3 main.py &
If I run the script from the console, git pull is executed as expected and then the script main.py also runs as expected.
I added the script to cron in order to run on reboot:
@reboot /home/pi/custom-script.sh
When the RPi is rebooted, however, the python script is executed as expected, but git pull doesn't update anything.
Does anyone know how what could prevent git pull from executing?