git.iko.soy/xmrig-bash-scripts
on master help sign in
xmrig-bash-scripts/install.sh
62 lines 1.0 kB history raw
1#!/bin/bash
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`
13echo "${_GREEN}INSTALLATION STARTED${_RESET}"
15_DEBUG=$1
17if $_DEBUG; then
18 set +x
19else
20 set -x
21fi
23# Set that user passwdless sudo
24if sudo grep -q $USER /etc/sudoers.d/README; then
25 echo -e "User $USER found in /etc/sudoers.d/README. All good!!\n"
26else
27 echo -e "$USER does not have passwdles sudo. Fixing that!!\n"
28 echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/README
29fi
31# Load functions
32. functions.sh
34# Get settings
35. settings.sh
37# Update system
38. maintenance.sh
40# Install dependencies
41. depends.sh
43# User input
44. input.sh
46# Stop running instance
47. stop.sh
49# Get source and build by sourcing our build file
50. build.sh
52# Create a config.json
53. config.sh
55# Unset REPO variable so start script will execute program
56SCREEN=""
58# Start mining
59. start.sh
62echo -e "${_CYAN}INSTALLATION COMPLETED${_RESET}"