prdatur / phpminer

PHPMiner is a web interface for cgminer on linux machines
Other
34 stars 15 forks source link

[FEATURE] Option to use BAMT/SMOS "mine {command}" service to start/stop cgminer #10

Closed nicoschtein closed 10 years ago

nicoschtein commented 10 years ago

Make it optional to, instead of running or killing cgminer directly, use the already existing mine service: Usage: /etc/init.d/mine {start|stop|restart|reload|force-reload|status}

In RPCClientApi.class.php add a check for the option Use BAMT/SMOS mine service enabled/disabled and if enabled:

kill_cgminer() should use mine stop

restart_cgminer() should use mine restart

Will make a PR with smos/bamt code only, for others to test.

prdatur commented 10 years ago

i have merged it into a new testing branch, but with the new feature to allow multiple miner software and switching them it will be hard to manage this with smos/bamt because they just use cgminer or now sgminer. when you have a bfgminer for example the mine stop/start will not work. You would need to check the system if it is smos or bamt, then the version of it and finally check to which miner smos is configurated and only if the current running pool use the same miner than you could use the service from bamt/smos. I think this is a bit too much of checking for not soooo much enhancements. I also recognized from another user that stopping the miner normally (for example within the console pressing q) then sometimes the system freezes, instead with killing it it worked.