mirror of
https://github.com/ilyakooo0/xmrig-bash-scripts.git
synced 2024-11-22 12:31:57 +03:00
detect if AES-NI
This commit is contained in:
parent
6728d5d7dd
commit
a6b3651571
12
config.sh
12
config.sh
@ -1,15 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script can be run standalone or as part of install.sh
|
||||
|
||||
_EMAIL="user@example.com"
|
||||
|
||||
_RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM"
|
||||
|
||||
_POOL_SERVER_URL="192.168.4.5"
|
||||
_POOL_SERVER_PORT="3333"
|
||||
|
||||
#################################
|
||||
_API_ID="null"
|
||||
_API_WORKER_ID="$HOSTNAME"
|
||||
|
||||
@ -21,7 +11,7 @@ _COLORS="true"
|
||||
|
||||
_CPU_ENABLED="true"
|
||||
_CPU_HUGE_PAGES="true"
|
||||
_CPU_HW_AES="null"
|
||||
_CPU_HW_AES="$_AES_NI"
|
||||
_CPU_PRIORITY="null"
|
||||
_CPU_ASM="true"
|
||||
_CPU_CN="0 1 2 3"
|
||||
|
18
settings.sh
18
settings.sh
@ -4,6 +4,15 @@ echo "#################################"
|
||||
echo " LOADING SETTINGS "
|
||||
echo "#################################"
|
||||
|
||||
_EMAIL="user@example.com"
|
||||
|
||||
_RECEIVE_WALLET="854sqm2Cm4TB2XgPHWqSPSbnFAe3SMzdEDzZHpukQ8NHBPFropbnkFmEKiZPgwjMFC9PTjaFscR2UU6ZwFCqJzGMUiZVbTM"
|
||||
|
||||
_POOL_SERVER_URL="192.168.4.5"
|
||||
_POOL_SERVER_PORT="3333"
|
||||
|
||||
#################################
|
||||
|
||||
# Set working directory
|
||||
_WORK_DIR="$(pwd)"
|
||||
cd $_WORK_DIR
|
||||
@ -87,6 +96,15 @@ else
|
||||
echo "vm.nr_hugepages=$_ENV_CORE" | sudo tee -a /etc/sysctl.conf
|
||||
fi
|
||||
|
||||
# Check if CPU supports AES-NI
|
||||
cpuid | grep -i aes > hw-aes.txt
|
||||
if grep -q true "hw-aes.txt"; then
|
||||
_AES_NI=true
|
||||
else
|
||||
_AES_NI=false
|
||||
fi
|
||||
rm hw-aes.txt
|
||||
|
||||
# Run apt maintenance
|
||||
_APT_MAINETANCE="1"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user