xmrig-bash-scripts/install.sh
Sean Wheller 94d6c657c9 reoganise
2019-08-10 17:27:01 +02:00

57 lines
876 B
Bash
Executable File

#!/bin/bash
_DEBUG=true
if $_DEBUG; then
set -x
else
set +x
fi
# Set that user passwdless sudo
if sudo grep -q $USER /etc/sudoers.d/README; then
echo -e "User $USER found in /etc/sudoers.d/README. All good!!\n"
else
echo -e "$USER does not have passwdles sudo. Fixing that!!\n"
echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/README
fi
# Load functions
. functions.sh
# Get settings
. settings.sh
sleep 5
# Stop running instance
. stop.sh
# Update system
. maintenance.sh
sleep 5
# Install dependencies
. depends.sh
sleep 5
# Get source and build by sourcing our build file
. build.sh
sleep 5
# Create a config.json
. config.sh
sleep 5
# Setup crontab for user
. crontab.sh
sleep 5
# Unset REPO variable so start script will execute program
SCREEN=""
# Start mining
. start.sh
echo -e "INSTALLATION COMPLETE\n"