I did a lot of research on this and I saw a lot of ways on how to do this. However, none of it seems working for me. For example, I did something like this:
I created a .config file under the directory mentioned above and wrote the following command (testScript.sh below is the script that i wanted to run) :
start on startup task exec /path/to/testScript.sh
Another way that i tried, I wrote something like this in rc.local file:
sudo -H /etc/init.d/testScript.sh start
And I put my testScript.sh in init.d. Both of these ways didn't work for me. The system didn't give me any errors or remarks. Did i make a mistake somewhere or is there another way to do this? So that my script execute automatically on the startup of the system.