I have the following commands I want to run when the raspberry pi boots up, it is for my bitcoin minner to start:cd /home/pi/cgminer-4.5.0sudo ./cgminer -o http://xxxxxxxxxxx -u xxxxxxxx -p xxxxxxxxxxHow can I do this? As I have currently set it up using nohup but this only autostarts when I ssh into the pi and stops working when I close the connection. I want this code to run automatically on startup and keep running constantly. I am running Raspbian. 
How to run cgminer on boot?
startup;raspberry pi
put the following code into :/etc/init.d/rc.local:/home/pi/cgminer-4.5.0/cgminer -o http://xxxxxxxxxxx -u xxxxxxxx -p xxxxxxxxxx