I'm trying to find any solution to this problem but for some reason I can't manage to make this work properly. The only thing I need is to run a .sh file located in the /home/pi folder.
I did it like this: 1. open terminal 2. sudo crontab -e 3. selected 2 (for /etc/nano) 4. I added at the end of the line: "@reboot /home/pi/Autorun.sh" 5. I created a file (/home/pi/Autorun.sh) and entered the following code:
#Mounts shared folder sudo mount //<IP-Address>/<folderpath> /home/pi/shared -o username=<Username>,password=<Password>
- I added the execution rights with:
sudo chmod +x /home/pi/Autorun.sh
- I check if the folder is mounted. Result = It's not.
- Running the script manually to check if it was the script which was not working. Result = Script works perfectly fine.
- Getting really disappointed and doing more research to find out where the problem is.
So now that I finally reached a very high level of disappointment I don't know what to try else then just throwing it out of the windows. Is anyone able to tell me how to fix the problem?
To give you some more details. I've downloaded the most recent version of Raspbian today the 04/18 version and installed it on the Raspberry Pi 3. The only things installed are a thightvncserver and xrdp. I've changed the keyboardlayout to german and expanded the filesystem already.
Here is the Solution for my problem.
@reboot sleep 30 && /home/pi/Autorun.sh