git.iko.soy/xmrig-bash-scripts
on master help sign in
Merge branch 'release/v1.0.7'
edc6f8dSean Wheller
README.md+18−17
@@ -11,6 +11,7 @@ A set of convenience scripts, written in bash, to help manage installation, conf
11There is allot to install so the install script will do most of the heavy lifting.
11There is allot to install so the install script will do most of the heavy lifting.
12At the start the expectation is that you have:
12At the start the expectation is that you have:
13* Computer running Ubuntu 18.04 (LTS)
13* Computer running Ubuntu 18.04 (LTS)
14+* Bash shell
14* User account with sudo privileges
15* User account with sudo privileges
15* Installed git
16* Installed git
16* Optionally installed [xmrig-proxy](https://github.com/xmrig/xmrig-proxy)
17* Optionally installed [xmrig-proxy](https://github.com/xmrig/xmrig-proxy)
@@ -21,38 +22,37 @@ Some knowledge of:
21* Linux Command Line Interface
22* Linux Command Line Interface
22* Linux shell `bash`
23* Linux shell `bash`
23
24
24−There is more to install but the install script will install the rest.
25−
26### Installation
25### Installation
27
26
281. Change to your user home directory.
271. Change to your user home directory.
29 `cd ~`
28 `cd ~`
30−
31−2. Install git.
29+1. Install git.
32 `sudo apt install git`
30 `sudo apt install git`
33−
34−3. Clone this project.
31+1. Clone this project.
35 `git clone https://github.com/seanwhe/xmrig-bash-scripts`
32 `git clone https://github.com/seanwhe/xmrig-bash-scripts`
36−
37−4. Change into the cloned directory.
33+1. Change into the cloned directory.
38 `cd xmrig-bash-scripts`
34 `cd xmrig-bash-scripts`
39−
40−5. Edit the settings file to your preference.
41− `vim settings.sh`
42−
43−6. Run the install script
35+1. Run the install script
44 `./install.sh`
36 `./install.sh`
45−
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
46−7. After install is complete. Attach to the screen session created during the installation.
44+1. After install is complete. Attach to the screen session created during the installation.
47 `screen -r`
45 `screen -r`
48
46
49### Operation
47### Operation
50
48
51Defaults - 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.
49Defaults - 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.
52
50
53−During install the folder source for [xmrig cpu](https://github.com/xmrig/xmrig) is cloned to `~/xmrig-bash-scripts/xmrig-cpu/`. The `config.json` is also created in this path.
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
54
55−This should work out the box, if you edit only the top section of `settings.sh` and followed the steps here.
55+This should work out the box, if you follow the installation steps and enter your own values for 'mysettings.sh.
56
56
57Once you have a running xmrig then you can start playing around and tweaking to suite requirements.
57Once you have a running xmrig then you can start playing around and tweaking to suite requirements.
58
58
@@ -67,6 +67,7 @@ The scripts are designed to be modular to promote resuse, execute exclusion and
67* crontab-on.sh - redefines the users crontab as 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.
68* depends.sh - installs dependancies required by xmrig and these scripts.
69* functions.sh - a collection of functions used in various of the 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'
70* install.sh - the main entry point when first installing.
71* install.sh - the main entry point when first installing.
71* maintenance.sh - performs apt update, upgrade, autoremove and autoclean operations.
72* maintenance.sh - performs apt update, upgrade, autoremove and autoclean operations.
72* settings.sh - contains variables used by these scripts.
73* settings.sh - contains variables used by these scripts.
build.sh+3−1
@@ -1,5 +1,7 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+echo "${_GREEN}BUILD STARTED${_RESET}"
4+
3# Clone source
5# Clone source
4if [ -d "$_XMRIG_CLONE_LOCATION" ]; then
6if [ -d "$_XMRIG_CLONE_LOCATION" ]; then
5
7
@@ -45,5 +47,5 @@ sudo cp $_XMRIG_BUILD_LOCATION/xmrig $_XMRIG_TARGET_LOCATION
45
47
46cd $_WORK_DIR
48cd $_WORK_DIR
47
49
48−echo "${_GREEN}BUILD COMPLETE${_RESET}"
50+echo "${_CYAN}BUILD STOPPED${_RESET}"
49
51
config.sh+3−1
@@ -1,6 +1,8 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+echo "${_GREEN}CONFIG STARTED${_RESET}"
4+
3echo "$_CONFIG_JSON" | tee config.json
5echo "$_CONFIG_JSON" | tee config.json
4
6
5−echo "${_GREEN}CONFIG CREATED${_RESET}"
7+echo "${_CYAN}CONFIG STOPPED${_RESET}"
6
8
crontab-off.sh+3−1
@@ -1,5 +1,7 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+echo "${_GREEN}DISABLE CRONTAB STARTED${_RESET}"
4+
3# Removes a user crontab
5# Removes a user crontab
4# Used in conjunction with crontab-on.sh to toggle user crontab between states:
6# Used in conjunction with crontab-on.sh to toggle user crontab between states:
5# on - start/stop xmrig at specified times
7# on - start/stop xmrig at specified times
@@ -12,5 +14,5 @@ crontab -l > crontab
12echo "Removing exiting crontab"
14echo "Removing exiting crontab"
13crontab -r
15crontab -r
14
16
15−echo "${_GREEN}CRONTAB DISABLED${_RESET}"
17+echo "${_CYAN}DISABLE CRONTAB STOPPED${_RESET}"
16
18
crontab-on.sh+3−1
@@ -1,5 +1,7 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+echo "${_GREEN}ENABLE CRONTAB STARTED${_RESET}"
4+
3# Defines a user crontab with schedules as defined in settings.sh
5# Defines a user crontab with schedules as defined in settings.sh
4# Used in conjunction with crontab-off.sh to toggle user crontab between states:
6# Used in conjunction with crontab-off.sh to toggle user crontab between states:
5# on - start/stop xmrig at specified times
7# on - start/stop xmrig at specified times
@@ -14,5 +16,5 @@ sleep 5
14. crontab.sh
16. crontab.sh
15sleep 5
17sleep 5
16
18
17−echo "${_GREEN}CRONTAB ENABLED${_RESET}"
19+echo "${_CYAN}ENABLE CRONTAB STOPPED${_RESET}"
18
20
crontab.sh+4−1
@@ -1,5 +1,8 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+
4+echo "${_GREEN}CRONTAB STARTED${_RESET}"
5+
3# Set values in settings script
6# Set values in settings script
4
7
5# Remove existing crontab
8# Remove existing crontab
@@ -15,5 +18,5 @@ crontab -l | { cat; echo "#Start at $_USER_TIMESTART on days $_USER_CRONDAYS
15crontab -l | { cat; echo "#Stop at $_USER_TIMESTOP on days $_USER_CRONDAYS
18crontab -l | { cat; echo "#Stop at $_USER_TIMESTOP on days $_USER_CRONDAYS
160 $_USER_CRONSTOP * * $_USER_CRONDAYS screen -S $_XMRIG_SCREEN -X kill"; } | crontab -
190 $_USER_CRONSTOP * * $_USER_CRONDAYS screen -S $_XMRIG_SCREEN -X kill"; } | crontab -
17
20
18−echo "${_GREEN}CRONTAB CREATED${_RESET}"
21+echo "${_CYAN}CRONTAB STOPPED${_RESET}"
19
22
depends.sh+3−1
@@ -2,6 +2,8 @@
2
2
3# Install the software requirements
3# Install the software requirements
4
4
5+echo "${_GREEN}INSTALL DEPENDS STARTED${_RESET}"
6+
5if [ $_APT_DEPENDS = 1 ]; then
7if [ $_APT_DEPENDS = 1 ]; then
6
8
7 # Install xmrig depends
9 # Install xmrig depends
@@ -12,4 +14,4 @@ if [ $_APT_DEPENDS = 1 ]; then
12
14
13fi
15fi
14
16
15−echo "${_GREEN}DEPENDENCIES INSTALLED${_RESET}"
17+echo "${_CYAN}INSTALL DEPENDS STOPPED${_RESET}"
functions.sh+26−4
@@ -1,5 +1,7 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+echo -e "${_GREEN}LOADING FUNCTIONS${_RESET}"
4+
3function prompt_confirm() {
5function prompt_confirm() {
4 while true; do
6 while true; do
5 read -r -n 1 -p "${1:-Continue?} [y/n]: " REPLY
7 read -r -n 1 -p "${1:-Continue?} [y/n]: " REPLY
@@ -11,10 +13,20 @@ function prompt_confirm() {
11 done
13 done
12}
14}
13
15
16+function show_settings () {
17+ echo "${_CYAN}Settings from loaded environment:${_RESET}"
18+ echo "${_GREEN}Pool URL:${_RESET}: $_POOL_SERVER_URL"
19+ echo "${_GREEN}Pool Port:${_RESET}: $_POOL_SERVER_PORT"
20+ echo "${_GREEN}Recieve Wallet:${_RESET}: $_RECEIVE_WALLET"
21+ echo "${_GREEN}Email Address:${_RESET}: $_EMAIL"
22+ echo "${_GREEN}Worker Identity:${_RESET}: $_API_WORKER_ID"
23+}
24+
14function show_mysettings () {
25function show_mysettings () {
15− if [ -f $_WORK_DIR/$_MYSETTINGS_FILE ]; then
26+ if [ -f $_WORK_DIR/$_MYSETTINGS_FILE ]; then
16− . $_MYSETTINGS_FILE
27+ load_mysettings
17− echo "${_GREEN}Settings from loaded from mysettings.sh.${_RESET}"
28+ echo "${_CYAN}Settings from mysettings.sh:${_RESET}"
29+ echo "${_CYAN}Settings loaded:${_RESET}"
18 echo "${_GREEN}Pool URL:${_RESET}: $_POOL_SERVER_URL"
30 echo "${_GREEN}Pool URL:${_RESET}: $_POOL_SERVER_URL"
19 echo "${_GREEN}Pool Port:${_RESET}: $_POOL_SERVER_PORT"
31 echo "${_GREEN}Pool Port:${_RESET}: $_POOL_SERVER_PORT"
20 echo "${_GREEN}Recieve Wallet:${_RESET}: $_RECEIVE_WALLET"
32 echo "${_GREEN}Recieve Wallet:${_RESET}: $_RECEIVE_WALLET"
@@ -23,6 +35,16 @@ function show_mysettings () {
23 fi
35 fi
24}
36}
25
37
38+function load_mysettings () {
39+ if [ -f $_WORK_DIR/$_MYSETTINGS_FILE ]; then
40+ . $_MYSETTINGS_FILE
41+ fi
42+}
43+
44+function my_config_json () {
45+ _CONFIG_JSON=$(jo -p -B api=$(jo id=$_API_ID worker-id=$_API_WORKER_ID) autosave=$_AUTOSAVE background=$_BACKGROUND colors=$_COLORS cpu=$(jo enabled=$_CPU_ENABLED huge-pages=$_CPU_HUGE_PAGES hw-aes=$_CPU_HW_AES priority=$_CPU_PRIORITY asm=$_CPU_ASM cn=$(jo -a $_CPU_CN) cn/0=$_CPU_CN_0 cn-lite/0=$_CPU_CN_LITE_0) donate-level=$_DONATE_LEVEL donate-over-proxy=$_DONATE_OVER_PROXY http=$(jo enabled=$_HTTP_ENABLED host=$_HTTP_HOST port=$_HTTP_PORT access-token=$_HTTP_ACCESS_TOKEN restricted=$_HTTP_RESTRICTED) logfile=$_LOGFILE pools=$(jo -a $(jo algo=$_POOLS_ALGO url=$_POOLS_URL user=$_POOLS_USER pass=$_POOLS_PASS rig-id=$_POOLS_RIG_ID nicehash=$_POOLS_NICEHASH keepalive=$_POOLS_KEEPALIVE enabled=$_POOLS_ENABLED tls=$_POOLS_TLS tls-fingerprint=$_POOLS_TLS_FINDERPRINT daemon=$_POOLS_DAEMON)) print-time=$_PRINT_TIME retries=$_RETRIES retry-pause=$_RETRIES_PAUSE syslog=$_SYSLOG user-agent=$_USER_AGENT watch=$_WATCH)
46+}
47+
26function build_xmrig () {
48function build_xmrig () {
27 if [ -d $_XMRIG_BUILD_LOCATION ]; then
49 if [ -d $_XMRIG_BUILD_LOCATION ]; then
28 # Remove existing build directory
50 # Remove existing build directory
@@ -103,4 +125,4 @@ function calc_hugepages () {
103
125
104}
126}
105
127
106−echo -e "${_GREEN}FUNCTIONS LOADED${_RESET}"
128+echo -e "${_CYAN}FUNCTIONS LOADED${_RESET}"
input.sh+23−10
@@ -2,23 +2,27 @@
2
2
3# Ask user questions
3# Ask user questions
4# Capture input
4# Capture input
5−. functions.sh
5+# if setting already exist use existing
6−. settings.sh
7
6
8−echo -e "${_YELLOW}Choose to use default settings or enter your own.\n"
7+echo -e "${_GREEN}USER SETTINGS STARTED${_RESET}"
9−
10−echo -e "Use defaults and values will be taken from 'settings.sh'."
11−echo -e "Enter your own and settings will persist to 'mysettings.sh'.\n"
12−
13−echo -e "Preference is given to settings in 'mysettings.sh'."
14−echo -e "When starting from 'start.sh' and 'mysettings.sh' exists it will be loaded instead of 'settings.sh'.${_RESET}\n"
15
8
16if [ -f $_WORK_DIR/$_MYSETTINGS_FILE ]; then
9if [ -f $_WORK_DIR/$_MYSETTINGS_FILE ]; then
17
10
18 # Call function
11 # Call function
19− show_mysettings
12+
13+ load_mysettings
14+
15+ my_config_json
20
16
21else
17else
18+ echo -e " ${_YELLOW}Opt for default settings or enter your own.\n"
19+
20+ echo -e " No - 'config.json' created with values from 'settings.sh'."
21+ echo -e " Yes - 'config.json' created with values from 'mysettings.sh' (recomended).\n"
22+
23+ echo -e " When 'mysettings.sh' exists this prompt will be skipped at furture installation."
24+ echo -e " Own settings is recomended to avoid your settings being overidden in upgrades.${_RESET}\n"
25+
22
26
23 prompt_confirm "Enter your own settings?"
27 prompt_confirm "Enter your own settings?"
24
28
@@ -54,7 +58,16 @@ else
54 echo "_RECEIVE_WALLET=\"$_RECEIVE_WALLET\"" >> $_MYSETTINGS_FILE_LOCATION
58 echo "_RECEIVE_WALLET=\"$_RECEIVE_WALLET\"" >> $_MYSETTINGS_FILE_LOCATION
55 echo "_EMAIL=\"$_EMAIL\"" >> $_MYSETTINGS_FILE_LOCATION
59 echo "_EMAIL=\"$_EMAIL\"" >> $_MYSETTINGS_FILE_LOCATION
56 echo "_API_WORKER_ID=\"$_API_WORKER_ID\"" >> $_MYSETTINGS_FILE_LOCATION
60 echo "_API_WORKER_ID=\"$_API_WORKER_ID\"" >> $_MYSETTINGS_FILE_LOCATION
61+ echo "_POOLS_URL=\"$_POOL_SERVER_URL:$_POOL_SERVER_PORT\"" >> $_MYSETTINGS_FILE_LOCATION
57
62
58 fi
63 fi
64+
65+ # Call function
66+
67+ load_mysettings
68+
69+ my_config_json
59
70
60fi
71fi
72+
73+echo "${_CYAN}USER SETTINGS STOPPED${_RESET}"
install.sh+14−1
@@ -1,5 +1,17 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+
4+# Colors
5+_CYAN=`tput setaf 1`
6+_GREEN=`tput setaf 2`
7+_YELLOW=`tput setaf 3`
8+_BLUE=`tput setaf 4`
9+_MAGENTA=`tput setaf 5`
10+_CYAN=`tput setaf 6`
11+_RESET=`tput sgr0`
12+
13+echo "${_GREEN}INSTALLATION STARTED${_RESET}"
14+
3_DEBUG=$1
15_DEBUG=$1
4
16
5if $_DEBUG; then
17if $_DEBUG; then
@@ -18,6 +30,7 @@ fi
18
30
19# Load functions
31# Load functions
20. functions.sh
32. functions.sh
33+sleep 5
21
34
22# Get settings
35# Get settings
23. settings.sh
36. settings.sh
@@ -57,4 +70,4 @@ SCREEN=""
57. start.sh
70. start.sh
58
71
59
72
60−echo -e "${_GREEN}INSTALLATION COMPLETE${_RESET}"
73+echo -e "${_CYAN}INSTALLATION COMPLETED${_RESET}"
maintenance.sh+3−1
@@ -1,10 +1,12 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+echo "${_GREEN}MAINTENANCE STARTED${_RESET}"
4+
3if [ $_APT_MAINETANCE = 1 ]; then
5if [ $_APT_MAINETANCE = 1 ]; then
4
6
5 sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean
7 sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean
6
8
7fi
9fi
8
10
9−echo "${_GREEN}MAINTENANCE COMPLETE${_RESET}"
11+echo "${_CYAN}MAINTENANCE STOPPED${_RESET}"
10
12
settings.sh+6−10
@@ -1,5 +1,7 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+echo -e "${_GREEN}LOADING DEFAULT SETTINGS${_RESET}"
4+
3_EMAIL="miners@prepaidmeters.com"
5_EMAIL="miners@prepaidmeters.com"
4
6
5_RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM"
7_RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM"
@@ -7,6 +9,9 @@ _RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwj
7_POOL_SERVER_URL="pool.supportxmr.com"
9_POOL_SERVER_URL="pool.supportxmr.com"
8_POOL_SERVER_PORT="3333"
10_POOL_SERVER_PORT="3333"
9
11
12+# Call function
13+show_settings
14+
10#######################################################################
15#######################################################################
11# DO NOT CHANGE AFTER THIS POINT UNLESS YOU KNOW WHAT YOU ARE DOING #
16# DO NOT CHANGE AFTER THIS POINT UNLESS YOU KNOW WHAT YOU ARE DOING #
12#######################################################################
17#######################################################################
@@ -71,8 +76,6 @@ _USER_AGENT="null"
71
76
72_WATCH="true"
77_WATCH="true"
73
78
74−_CONFIG_JSON=$(jo -p -B api=$(jo id=$_API_ID worker-id=$_API_WORKER_ID) autosave=$_AUTOSAVE background=$_BACKGROUND colors=$_COLORS cpu=$(jo enabled=$_CPU_ENABLED huge-pages=$_CPU_HUGE_PAGES hw-aes=$_CPU_HW_AES priority=$_CPU_PRIORITY asm=$_CPU_ASM cn=$(jo -a $_CPU_CN) cn/0=$_CPU_CN_0 cn-lite/0=$_CPU_CN_LITE_0) donate-level=$_DONATE_LEVEL donate-over-proxy=$_DONATE_OVER_PROXY http=$(jo enabled=$_HTTP_ENABLED host=$_HTTP_HOST port=$_HTTP_PORT access-token=$_HTTP_ACCESS_TOKEN restricted=$_HTTP_RESTRICTED) logfile=$_LOGFILE pools=$(jo -a $(jo algo=$_POOLS_ALGO url=$_POOLS_URL user=$_POOLS_USER pass=$_POOLS_PASS rig-id=$_POOLS_RIG_ID nicehash=$_POOLS_NICEHASH keepalive=$_POOLS_KEEPALIVE enabled=$_POOLS_ENABLED tls=$_POOLS_TLS tls-fingerprint=$_POOLS_TLS_FINDERPRINT daemon=$_POOLS_DAEMON)) print-time=$_PRINT_TIME retries=$_RETRIES retry-pause=$_RETRIES_PAUSE syslog=$_SYSLOG user-agent=$_USER_AGENT watch=$_WATCH)
75−
76# Set working directory
79# Set working directory
77_WORK_DIR="$(pwd)"
80_WORK_DIR="$(pwd)"
78cd $_WORK_DIR
81cd $_WORK_DIR
@@ -126,13 +129,6 @@ _APT_MAINETANCE="1"
126# 1 = yes 0 = no
129# 1 = yes 0 = no
127_APT_DEPENDS="1"
130_APT_DEPENDS="1"
128
131
129−# Colors
130−_GREEN=`tput setaf 2`
131−_YELLOW=`tput setaf 3`
132−_BLUE=`tput setaf 4`
133−_MAGENTA=`tput setaf 5`
134−_CYAN=`tput setaf 6`
135−_RESET=`tput sgr0`
136
132
137−echo -e "${_GREEN}SETTINGS LOADED${_RESET}"
133+echo -e "${_CYAN}DEFAULT SETTINGS LOADED${_RESET}"
138
134
start.sh+8−1
@@ -1,5 +1,7 @@
1#!/bin/bash
1#!/bin/bash
2
2
3+echo "${_GREEN}MINING STARTED${_RESET}"
4+
3# When this script is:
5# When this script is:
4# * run by crontab, load the settings
6# * run by crontab, load the settings
5# * run by install, do not load settings
7# * run by install, do not load settings
@@ -11,6 +13,7 @@
11if ! screen -list | grep -q "$_XMRIG_SCREEN"; then
13if ! screen -list | grep -q "$_XMRIG_SCREEN"; then
12
14
13 # Call functions
15 # Call functions
16+ show_settings
14 show_mysettings
17 show_mysettings
15 start_xmrig
18 start_xmrig
16
19
@@ -23,5 +26,9 @@ else
23
26
24fi
27fi
25
28
26−echo "${_GREEN}MINING STARTED${_RESET}"
29+echo "${_CYAN}MINING RUNNING${_RESET}"
30+echo "${_YELLOW} The process is running in a screen session."
31+echo "${_YELLOW} The screen session is named:${_RESET} $_XMRIG_SCREEN"
32+echo "${_YELLOW} Command to view process:${_RESET} screen -r $_XMRIG_SCREEN"
33+echo "${_MAGENTA} ENJOY!!!${_RESET}"
27
34
stop.sh+3−1
@@ -4,6 +4,8 @@
4# * run by crontab, load the settings
4# * run by crontab, load the settings
5# * run by install, do not load settings
5# * run by install, do not load settings
6
6
7+echo "${_GREEN}END MINING STARTED${_RESET}"
8+
7if [ -z "$_XMRIG_SCREEN" ]; then
9if [ -z "$_XMRIG_SCREEN" ]; then
8 # Load settings when run by crontab
10 # Load settings when run by crontab
9 . settings.sh
11 . settings.sh
@@ -16,5 +18,5 @@ else
16 stop_xmrig
18 stop_xmrig
17fi
19fi
18
20
19−echo "${_GREEN}MINING STOPPED${_RESET}"
21+echo "${_CYAN}END MINING STOPPED${_RESET}"
20
22