How to run cgminer on boot?

5,367

put the following code into : /etc/init.d/rc.local:

/home/pi/cgminer-4.5.0/cgminer -o http://xxxxxxxxxxx -u xxxxxxxx -p xxxxxxxxxx
Share:
5,367

Related videos on Youtube

user1685880
Author by

user1685880

Updated on September 18, 2022

Comments

  • user1685880
    user1685880 over 1 year

    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.0
    sudo ./cgminer -o http://xxxxxxxxxxx -u xxxxxxxx -p xxxxxxxxxx
    

    How 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.

    • smw
      smw over 9 years
    • terdon
      terdon over 9 years
      @steeldriver yes, I asked them to delete the AU one since it's off topic there and I suggested the OP post here instead.
    • Ludwig Schulze
      Ludwig Schulze over 9 years
      Any reason why you should start cgminer with root permissions?
    • user1685880
      user1685880 over 9 years
      I have tried starting it without root permissions, but get the error no usb connected, by starting it in root fixes the error for some reason
    • Ludwig Schulze
      Ludwig Schulze over 9 years
      I would recommend you to ask another question about that problem. cgminer should work fine without root privileges.
  • user1685880
    user1685880 over 9 years
    Thanks this seem to be working fine for me and so simple thanks :)