Merge branch 'release/v1.0.8'

This commit is contained in:
Sean Wheller 2019-08-13 18:14:44 +02:00
commit 7402175231
8 changed files with 31 additions and 45 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
xmrig-cpu/
*.swp
crontab
null
config.json
myconfig.json
mysettings.sh

View File

@ -4,7 +4,7 @@
echo "${_GREEN}INSTALL DEPENDS STARTED${_RESET}"
if [ $_APT_DEPENDS = 1 ]; then
if [ "$_APT_DEPENDS" -eq "1" ]; then
# Install xmrig depends
sudo apt install -y software-properties-common git build-essential cmake libuv1-dev libssl-dev libmicrohttpd-dev libhwloc-dev gcc g++

View File

@ -15,23 +15,18 @@ function prompt_confirm() {
function show_settings () {
echo "${_CYAN}Settings from loaded environment:${_RESET}"
echo "${_GREEN}Pool URL:${_RESET}: $_POOL_SERVER_URL"
echo "${_GREEN}Pool Port:${_RESET}: $_POOL_SERVER_PORT"
echo "${_GREEN}Recieve Wallet:${_RESET}: $_RECEIVE_WALLET"
echo "${_GREEN}Email Address:${_RESET}: $_EMAIL"
echo "${_GREEN}Worker Identity:${_RESET}: $_API_WORKER_ID"
echo "${_GREEN}Pool URL:${_RESET}: $_POOLS_URL"
echo "${_GREEN}Recieve Wallet:${_RESET}: $_POOLS_USER"
echo "${_GREEN}Email Address:${_RESET}: $_POOLS_PASS"
}
function show_mysettings () {
if [ -f $_WORK_DIR/$_MYSETTINGS_FILE ]; then
load_mysettings
echo "${_CYAN}Settings from mysettings.sh:${_RESET}"
echo "${_CYAN}Settings loaded:${_RESET}"
echo "${_GREEN}Pool URL:${_RESET}: $_POOL_SERVER_URL"
echo "${_GREEN}Pool Port:${_RESET}: $_POOL_SERVER_PORT"
echo "${_GREEN}Recieve Wallet:${_RESET}: $_RECEIVE_WALLET"
echo "${_GREEN}Email Address:${_RESET}: $_EMAIL"
echo "${_GREEN}Worker Identity:${_RESET}: $_API_WORKER_ID"
echo "${_GREEN}Pool URL:${_RESET}: $_POOLS_URL"
echo "${_GREEN}Recieve Wallet:${_RESET}: $_POOLS_USER"
echo "${_GREEN}Email Address:${_RESET}: $_POOLS_PASS"
fi
}
@ -42,7 +37,7 @@ function load_mysettings () {
}
function my_config_json () {
_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)
_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) log-file=$_LOG_FILE 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)
}
function build_xmrig () {

View File

@ -36,29 +36,17 @@ else
# Prompt user input
echo "Current pool URL: $_POOL_SERVER_URL"
read -p "Enter new pool URL: " _POOL_SERVER_URL
echo "Current pool URL: $_POOLS_URL"
read -p "Enter new pool URL: " _POOLS_URL
echo "_POOLS_URL=\"$_POOLS_URL\"" >> $_MYSETTINGS_FILE_LOCATION
echo "Current pool TCP Port: $_POOL_SERVER_PORT"
read -p "Enter new pool TCP Port: " _POOL_SERVER_PORT
echo "Current Receive Wallet address: $_POOLS_USER"
read -p "Enter new Receive Wallet address: " _POOLS_USER
echo "_POOLS_USER=\"$_POOLS_USER\"" >> $_MYSETTINGS_FILE_LOCATION
echo "Current Receive Wallet address: $_RECEIVE_WALLET"
read -p "Enter new Receive Wallet address: " _RECEIVE_WALLET
echo "Current email address: $_EMAIL"
read -p "Enter new email address: " _EMAIL
echo "Current Miner Identifier: $_API_WORKER_ID"
read -p "Enter Miner Identifier: " _API_WORKER_ID
# Write user input to file
echo "_POOL_SERVER_URL=\"$_POOL_SERVER_URL\"" >> $_MYSETTINGS_FILE_LOCATION
echo "_POOL_SERVER_PORT=\"$_POOL_SERVER_PORT\"" >> $_MYSETTINGS_FILE_LOCATION
echo "_RECEIVE_WALLET=\"$_RECEIVE_WALLET\"" >> $_MYSETTINGS_FILE_LOCATION
echo "_EMAIL=\"$_EMAIL\"" >> $_MYSETTINGS_FILE_LOCATION
echo "_API_WORKER_ID=\"$_API_WORKER_ID\"" >> $_MYSETTINGS_FILE_LOCATION
echo "_POOLS_URL=\"$_POOL_SERVER_URL:$_POOL_SERVER_PORT\"" >> $_MYSETTINGS_FILE_LOCATION
echo "Current email address: $_POOLS_PASS"
read -p "Enter new email address: " _POOLS_PASS
echo "_POOLS_PASS=\"$_POOLS_PASS\"" >> $_MYSETTINGS_FILE_LOCATION
fi

View File

@ -36,13 +36,6 @@ sleep 5
. settings.sh
sleep 5
# User input
. input.sh
sleep 5
# Stop running instance
. stop.sh
# Update system
. maintenance.sh
sleep 5
@ -51,6 +44,13 @@ sleep 5
. depends.sh
sleep 5
# User input
. input.sh
sleep 5
# Stop running instance
. stop.sh
# Get source and build by sourcing our build file
. build.sh
sleep 5

View File

@ -2,7 +2,7 @@
echo "${_GREEN}MAINTENANCE STARTED${_RESET}"
if [ $_APT_MAINETANCE = 1 ]; then
if [ "$_APT_MAINETANCE" -eq "1" ]; then
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean

View File

@ -114,8 +114,8 @@ _XMRIG_CONFIG="config.json"
_XMRIG_CONFIG_LOCATION="$_WORK_DIR/$_XMRIG_CONFIG"
# Set values for crontab
_USER_CRONSTART="18"
_USER_CRONSTOP="6"
_USER_CRONSTART="17"
_USER_CRONSTOP="8"
_USER_CRONDAYS="1-5"
# Set the name of the screen created by start script

View File

@ -1,9 +1,11 @@
#!/bin/bash
echo "${_GREEN}UPDATE STARTED${_RESET}"
git pull
# install
. install.sh
sleep 5
echo "${_GREEN}UPDATE COMPLETE${_RESET}"
echo "${_CYAN}UPDATE COMPLETE${_RESET}"