mirror of
https://github.com/ilyakooo0/xmrig-bash-scripts.git
synced 2024-11-22 04:04:22 +03:00
color echo
This commit is contained in:
parent
097d5a426a
commit
f83b331424
2
build.sh
2
build.sh
@ -45,5 +45,5 @@ sudo cp $_XMRIG_BUILD_LOCATION/xmrig $_XMRIG_TARGET_LOCATION
|
||||
|
||||
cd $_WORK_DIR
|
||||
|
||||
echo "BUILD COMPLETE"
|
||||
echo "${_GREEN}BUILD COMPLETE${_RESET}"
|
||||
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
echo "$_CONFIG_JSON" | tee config.json
|
||||
|
||||
echo "CONFIG CREATED"
|
||||
echo "${_GREEN}CONFIG CREATED${_RESET}"
|
||||
|
||||
|
@ -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}"
|
||||
|
||||
|
@ -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}"
|
||||
|
||||
|
@ -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}"
|
||||
|
||||
|
@ -12,4 +12,4 @@ if [ $_APT_DEPENDS = 1 ]; then
|
||||
|
||||
fi
|
||||
|
||||
echo "DEPENDENCIES INSTALLED"
|
||||
echo "${_GREEN}DEPENDENCIES INSTALLED${_RESET}"
|
||||
|
@ -80,4 +80,4 @@ calc_hugepages () {
|
||||
|
||||
}
|
||||
|
||||
echo -e "FUNCTIONS LOADED\n\n"
|
||||
echo -e "${_GREEN}FUNCTIONS LOADED${_RESET}"
|
||||
|
@ -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}"
|
||||
|
@ -6,5 +6,5 @@ if [ $_APT_MAINETANCE = 1 ]; then
|
||||
|
||||
fi
|
||||
|
||||
echo "MAINTENANCE COMPLETE"
|
||||
echo "${_GREEN}MAINTENANCE COMPLETE${_RESET}"
|
||||
|
||||
|
@ -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}"
|
||||
|
||||
|
2
start.sh
2
start.sh
@ -22,5 +22,5 @@ else
|
||||
|
||||
fi
|
||||
|
||||
echo "MINING STARTED"
|
||||
echo "${_GREEN}MINING STARTED${_RESET}"
|
||||
|
||||
|
2
stop.sh
2
stop.sh
@ -16,5 +16,5 @@ else
|
||||
stop_xmrig
|
||||
fi
|
||||
|
||||
echo "MINING STOPPED"
|
||||
echo "${_GREEN}MINING STOPPED${_RESET}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user