I've tried to start a shell script on my Raspberry Pi 3.
I wrote the path in rc.local. This worked for all other scrpits but not for the one below. I think the script starts (if I add a "sleep" the terminal opens after start) but doesn't work at this time. When I start the script by hand it works fine. Has somebody a clue?
#!/bin/bash
status=$( cat status.txt )
if [ $status == 0 ]
then
./s0.sh
fi
if [ $status == 1 ]
then
./s1.sh
fi
if [ $status == 2 ]
then
./s2.sh
fi
The Problem is that you have to use absolute pathes to the scripts. Using /home/pi/Dektop/s0.sh and so on will work