I have the following bash script:
FILE=/home/pi/kpidry/test.zip
if test -f "$FILE";
then
echo "$FILE exists"
rm -r /home/pi/test/*
unzip /home/pi/kpidry/test.zip -d /home/pi/test/
rm -r /home/pi/kpidry/test.zip
fi
exit 0
The script runs fine when I run it manually, and executes all the commands as expected. However, I have added a line to rc.local in order to run the script on boot. When that runs, it executes every line except the unzip line. Could this be because the unzip program is not yet running? If so, can I run it manually in rc.local?
Any help is very much appreciated!
/usr/bin/zipor whatever)?unzipprogram only runs while it's doing something. (It's not started like a Windows "service" and left to sit around until needed.)stdout.