@@ -1,5 +1,5 @@
11# xmrig-bash-scripts
2−A set of convenience scripts, written in bash, to help manage installation, configuration and update of [xmrig cpu](https://github.com/xmrig/xmrig) across multiple hosts.
2+A simple collection of bash shell scripts to manage installation, update and configuration of [xmrig cpu](https://github.com/xmrig/xmrig) across multiple hosts.
33
44
55## Download
@@ -8,112 +8,48 @@ A set of convenience scripts, written in bash, to help manage installation, conf
88
99### Prerequisites
1010
11−There is allot to install so the install script will do most of the heavy lifting.
12−At the start the expectation is that you have:
13−* Computer running Ubuntu 18.04 (LTS)
14−* Bash shell
11+* Ubuntu Linux (or other Debian-based distribution)
1512* User account with sudo privileges
16−* Installed git
17−* Optionally installed [xmrig-proxy](https://github.com/xmrig/xmrig-proxy)
1813
19−### Agreeable
14+### Installion
2015
21−Some knowledge of:
22−* Linux Command Line Interface
23−* Linux shell `bash`
24−
25−### Installation
26−
27−1. Change to your user home directory.
28− `cd ~`
29−1. Install git.
30− `sudo apt install git`
31−1. Clone this project.
32− `git clone https://github.com/seanwhe/xmrig-bash-scripts`
33−1. Change into the cloned directory.
16+1. Change in to the cloned directory
3417 `cd xmrig-bash-scripts`
35−1. Run the install script
36− `./install.sh`
37−1. When prompted: "Enter your own settings?" enter 'y'es.
38−1. Enter values for your:
39− 1. Pool server URL
40− 1. Pool server TCP port
41− 1. Receive wallet address
42− 1. Email address
43− 1. Miner identifier name
44−1. After install is complete. Attach to the screen session created during the installation.
45− `screen -r`
46−
47−### Operation
48−
49−Defaults - The settings.sh contains a number of variables. With the exception of the 'xmrig' binary, which is installed to `/usr/bin/xmrig`, all files remain in the cloned project directory `~/xmrig-bash-scripts`. Any files generated while running the scripts are also created in this directory.
50−
51−During install the folder source for [xmrig cpu](https://github.com/xmrig/xmrig) is cloned to `~/xmrig-bash-scripts/xmrig-cpu/`. The file `config.json`, used to configure xmrig, is also created in this path and is passed to xmrig at startup.
52−
53−During installation it is recomended to enter your own settings. This creates a file named 'mysettings.sh' which will not be overwritten during future installs or upgrades. Values for variables found in 'mysettings.sh' are used to create 'config.json'.
54−
55−This should work out the box, if you follow the installation steps and enter your own values for 'mysettings.sh.
56−
57−Once you have a running xmrig then you can start playing around and tweaking to suite requirements.
58−
59−What follows is a brief of the shell scripts you will find. The names are mostly self explanatory.
60−Comments and notes are used liberally in the scripts to help give you hints as to how it works.
61−The scripts are designed to be modular to promote resuse, execute exclusion and standalone execution.
62−
63−* build.sh - clones xmrig to ``~/xmrig-bash-scripts`/xmrig-cpu`, configures, builds and copies xmrig to `/usr/bin/`
64−* config.sh - contains variables that aid in defining the values for the attributes found in config.json.
65−* crontab.sh - installs a cron to start and a cron to stop at specific times (Can be commented out of install if desired).
66−* crontab-off - removed the users crontab created during install.
67−* crontab-on.sh - redefines the users crontab as created during install.
68−* depends.sh - installs dependancies required by xmrig and these scripts.
69−* functions.sh - a collection of functions used in various of the scripts.
70−* input.sh - prompts to enter values for creating 'mysettings.sh'
71−* install.sh - the main entry point when first installing.
72−* maintenance.sh - performs apt update, upgrade, autoremove and autoclean operations.
73−* settings.sh - contains variables used by these scripts.
74−* start.sh - starts xmrig in a screen session.
75−* stop.sh - stops xmrig screen session.
76−
77−### Viewing the log
78−Default of the start script is to create a screen session named 'xmrig-cpu'.
79−This can be changed in the settings script if required.
80−To view the log after installation is finished or after running the start script, used the following command:
81−`screen -r xmrig-cpu`
82−
83−### Updating
84−A simple `git update` in `~/xmrig-bash-scripts` will update these scripts.
8518
86−The install script can be run at any time to update the xmrig source found `~/xmrig-bash-scripts/xmrig-cpu`.
87−The branch checkout is taken from the `_XMRIG_BRANCH` variable in `settings.sh`.
19+2. Edit the settings file to your preference.
20+ `vim settings.sh`
8821
89−A script named update.sh is provided to perform both these steps in a single command.
22+3. Run the install script
23+ `./install.sh`
9024
91−## Reporting issues
25+The install script do the following:
26+1. Load the settings ensuring that your user has passwordless sudo and that vm.nr_hugepages is set.
27+2. Stop any existing screen session runing xmrig.
28+3. Run apt update, upgrade, autoremove, autoclean on system.
29+4. Install required build dependencies.
30+5. Git clone xmrig source to ~/xmrig-bash-scripts/xmrig-cpui/ and change to specified branch
31+6. Build and install xmrig to /usr/bin
32+7. Start a screen named xmrig-cpu running xmrig
9233
93−[xmrig cpu](https://github.com/xmrig/xmrig) and [xmrig bash scripts](https://github.com/seanwhe/xmrig-bash-scripts.git) are different projects run by different people.
34+## Viewing mining process
35+`screen -r xmrig-cpu`
9436
95−While the developers of both projects may be seen interacting with one another on either project, we ask that you report issues to the respective projects.
96−In other words, post issues for:
97−* xmrig, the Monero (XMR) CPU miner, over at [xmrig issues tracker](https://github.com/xmrig/xmrig/issues)
98−* xmrig-bash-scripts, these conveniece scripts, over at [xmrig-bash-scripts](https://github.com/seanwhe/xmrig-bash-scripts/issues)
37+Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
9938
10039## Versioning
10140
10241We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/seanwhe/xmrig-bash-scripts/tags).
10342
104−## Contributing
105−Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
106−
107−See also the list of [contributors](https://github.com/seanwhe/xmrig-bash-scripts/CONTRIBUTORS)
108−
10943## Authors
11044
11145* **Sean Wheller** - *Initial work* - [seanwhe](https://github.com/seanwhe)
11246
47+See also the list of [contributors](https://github.com/seanwhe/xmrig-bash-scripts/CONTRIBUTORS
48+
11349## License
11450
11551This project is licensed under the GNU General Public License v3.0 - see the [LICENSE.md](LICENSE.md) file for details
11652
11753## Acknowledgments
11854
119−* Thanks to [fireice-uk](https://github.com/fireice-uk) for developing and maintaining [xmrig products](https://xmrig.com/).
55+* Thanks to [fireice-uk](https://github.com/fireice-uk) for developing and maintaining xmrig