Bitcoin Forum

Other => Beginners & Help => Topic started by: jashie on October 12, 2018, 03:24:46 PM



Title: Running cgminer as a service of some sort
Post by: jashie on October 12, 2018, 03:24:46 PM
I have a Linux box and first of all, my Linux skills, I would consider to be basic.  I have had some exposure to the terminal and sudo… Currently my Linux box sits idle (normally without a monitor, keyboard, mouse, etc.) for a different purpose but it is underutilized so, I started running CGminer for a USB miner through a terminal session.  However, every time there is a power outage, I have to manually re-login to the box and execute the terminal session, enter the command line and minimize. It would be nice if when my Linux box reboots, it re-establishes the CGminer application either as a service, auto login, or something…  Are there any suggestions?  

Distributor ID:   Ubuntu
Description:   Ubuntu 14.04.5 LTS
Release:   14.04
Codename:   trusty


Title: Re: Running cgminer as a service of some sort
Post by: AdolfinWolf on October 12, 2018, 03:56:05 PM
I have a Linux box and first of all, my Linux skills, I would consider to be basic.  I have had some exposure to the terminal and sudo… Currently my Linux box sits idle (normally without a monitor, keyboard, mouse, etc.) for a different purpose but it is underutilized so, I started running CGminer for a USB miner through a terminal session.  However, every time there is a power outage, I have to manually re-login to the box and execute the terminal session, enter the command line and minimize. It would be nice if when my Linux box reboots, it re-establishes the CGminer application either as a service, auto login, or something…  Are there any suggestions?  

Distributor ID:   Ubuntu
Description:   Ubuntu 14.04.5 LTS
Release:   14.04
Codename:   trusty

You'll need to write some sort of script for that probably.

There are a lot of resources about this online, but they all seem a bit outdated maybe.

Something like this? https://unix.stackexchange.com/a/156559

Quote

put the following code into : /etc/init.d/rc.local:
Code:
/home/pi/cgminer-4.5.0/cgminer -o http://xxxxxxxxxxx -u xxxxxxxx -p xxxxxxxxxx

Obviously the version numbers etc are all outdated, paths are not correct for ubuntu, but i'm pretty sure handling it this way should work. -- It's worth a try.



Or some of these scripts?

https://www.reddit.com/r/litecoinmining/comments/20c894/cgminer_startup_script_for_xubuntu/
https://bitcointalk.org/index.php?topic=51622.msg761722#msg761722