Bitcoin Forum
May 11, 2024, 02:29:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bfgminer as daemon?  (Read 86 times)
tom22022 (OP)
Jr. Member
*
Offline Offline

Activity: 33
Merit: 8


View Profile
May 04, 2021, 02:49:39 PM
 #1

I am using bfgminer as a proxy only, is there a way to run this as a daemon in the background?  Right now I have to have an open console window.
1715437781
Hero Member
*
Offline Offline

Posts: 1715437781

View Profile Personal Message (Offline)

Ignore
1715437781
Reply with quote  #2

1715437781
Report to moderator
1715437781
Hero Member
*
Offline Offline

Posts: 1715437781

View Profile Personal Message (Offline)

Ignore
1715437781
Reply with quote  #2

1715437781
Report to moderator
1715437781
Hero Member
*
Offline Offline

Posts: 1715437781

View Profile Personal Message (Offline)

Ignore
1715437781
Reply with quote  #2

1715437781
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
AzagraMac
Newbie
*
Offline Offline

Activity: 14
Merit: 2


View Profile
May 05, 2021, 01:54:11 PM
 #2

So I have cgminer, it starts at startup, picks configuration from the file, background process with screen, and if it stops, it starts again.

/etc/systemd/system/cgminer.service
Code:
[Unit]
Description=cgminer
After=network.target ntp.service

[Service]
Type=forking
ExecStart=/usr/bin/screen -dmS cgminer /home/$USER/cgminer-4.9.2/cgminer --sharelog /home/$USER/cgminer.log -c /home/$USER/.cgminer/cgminer.conf
ExecStop=/usr/bin/screen -S cgminer -X quit
Restart=always

[Install]
WantedBy=multi-user.target

Code:
chmod 0644 /etc/systemd/system/cgminer.service
systemctl enable cgminer.service


BTC 1DCRu4pnnwtbUYRy1evVw7TzXGW8XMwMNc
tom22022 (OP)
Jr. Member
*
Offline Offline

Activity: 33
Merit: 8


View Profile
May 05, 2021, 08:23:05 PM
 #3

Thanks.  Ubuntu I presume?

Any way to prioritize startups of those files?  For example, if I want to start bitcoind first, then bfgminer proxy, then cgminer last?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!