color echo

This commit is contained in:
Sean Wheller 2019-08-10 19:43:18 +02:00
parent 097d5a426a
commit f83b331424
13 changed files with 16 additions and 26 deletions

View File

@ -45,5 +45,5 @@ sudo cp $_XMRIG_BUILD_LOCATION/xmrig $_XMRIG_TARGET_LOCATION
cd $_WORK_DIR
echo "BUILD COMPLETE"
echo "${_GREEN}BUILD COMPLETE${_RESET}"

View File

@ -2,5 +2,5 @@
echo "$_CONFIG_JSON" | tee config.json
echo "CONFIG CREATED"
echo "${_GREEN}CONFIG CREATED${_RESET}"

View File

@ -5,11 +5,6 @@
# on - start/stop xmrig at specified times
# off - do not start/stop xmrig
echo "#################################"
echo "# DISABLING CRONTAB #"
echo "#################################"
# Remove existing crontab
echo "Backup existing crontab"
crontab -l > crontab
@ -17,7 +12,5 @@ crontab -l > crontab
echo "Removing exiting crontab"
crontab -r
echo "#################################"
echo "# CRONTAB DISABLED #"
echo "#################################"
echo "${_GREEN}CRONTAB DISABLED${_RESET}"

View File

@ -5,10 +5,6 @@
# on - start/stop xmrig at specified times
# off - do not start/stop xmrig
echo "####################################"
echo "# ENABLING CRONTAB #"
echo "####################################"
# Get settings
. settings.sh
. functions.sh
@ -18,7 +14,5 @@ sleep 5
. crontab.sh
sleep 5
echo "####################################"
echo "# CRONTAB ENABLED #"
echo "####################################"
echo "${_GREEN}CRONTAB ENABLED${_RESET}"

View File

@ -15,5 +15,5 @@ crontab -l | { cat; echo "#Start at $_USER_TIMESTART on days $_USER_CRONDAYS
crontab -l | { cat; echo "#Stop at $_USER_TIMESTOP on days $_USER_CRONDAYS
0 $_USER_CRONSTOP * * $_USER_CRONDAYS screen -S $_XMRIG_SCREEN -X kill"; } | crontab -
echo "CRONTAB CREATED"
echo "${_GREEN}CRONTAB CREATED${_RESET}"

View File

@ -12,4 +12,4 @@ if [ $_APT_DEPENDS = 1 ]; then
fi
echo "DEPENDENCIES INSTALLED"
echo "${_GREEN}DEPENDENCIES INSTALLED${_RESET}"

View File

@ -80,4 +80,4 @@ calc_hugepages () {
}
echo -e "FUNCTIONS LOADED\n\n"
echo -e "${_GREEN}FUNCTIONS LOADED${_RESET}"

View File

@ -8,6 +8,9 @@ else
set -x
fi
_GREEN=`tput setaf 2`
_RESET=`tput sgr0`
# 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"
@ -53,4 +56,4 @@ SCREEN=""
. start.sh
echo -e "INSTALLATION COMPLETE\n"
echo -e "${_GREEN}INSTALLATION COMPLETE${_RESET}"

View File

@ -6,5 +6,5 @@ if [ $_APT_MAINETANCE = 1 ]; then
fi
echo "MAINTENANCE COMPLETE"
echo "${_GREEN}MAINTENANCE COMPLETE${_RESET}"

View File

@ -120,5 +120,5 @@ _APT_MAINETANCE="1"
# 1 = yes 0 = no
_APT_DEPENDS="1"
echo -e "SETTINGS LOADED\n\n"
echo -e "${_GREEN}SETTINGS LOADED${_RESET}"

View File

@ -22,5 +22,5 @@ else
fi
echo "MINING STARTED"
echo "${_GREEN}MINING STARTED${_RESET}"

View File

@ -16,5 +16,5 @@ else
stop_xmrig
fi
echo "MINING STOPPED"
echo "${_GREEN}MINING STOPPED${_RESET}"

View File

@ -6,4 +6,4 @@ git pull
. install.sh
sleep 5
echo "UPATE COMPLETE"
echo "${_GREEN}UPDATE COMPLETE${_RESET}"