I have this error when I want to mine XMR:
/home/m1/NVOC/mining/0miner: line 159: xmr-stak_VERSION: bad substitution
/home/m1/NVOC/mining/0miner: line 179: xmr-stak_VERSION: bad substitution
Are you sure you used the correct name? because the variable is pointed to "xmr-stak_VERSION" but it should be "XMR_Stak_VERSION"
Ok, i tried again with you code and finally, it's Ok.
But i had this code for memory huge page like this :
## CRYPTONIGHTV7
elif [[ $ALGO == CRYPTONIGHTV7 || $ALGO == CRYPTONIGHTHEAVY ]];
then
# Large memory page support
sudo sysctl -w vm.nr_hugepages=128
# Remove nvidia.txt if cards count changed
if [ -f ~/nvidia.txt ]
then
if [ "$(grep -c "// gpu:" ~/nvidia.txt)" != "$(nvidia-smi -i 0 --query-gpu=count --format=csv,noheader,nounits)" ]
then
rm ~/nvidia.txt
fi
fi
# Change verbosity to show hashrate in output log
if [ -f ~/config.txt ]
then
if grep -q '"verbose_level" : 3' ~/config.txt
then
sed -i 's/"verbose_level" : 3/"verbose_level" : 4/g' ~/config.txt
fi
fi
if [[ $ALGO == "CRYPTONIGHTV7" ]]
then
UCCALGO="--currency monero7"
elif [[ $ALGO == "CRYPTONIGHTHEAVY" ]]
then
UCCALGO="-a cryptonight-heavy"
fi
HCD=${NVOC}/miners/XMR_Stak/"${!xversion}"/xmr-stak
eval $LAUNCH $HCD $UCCALGO --noCPU --noAMD -o "${!xpool}":"${!xport}" -u "${!xaddr}" -p "$MINER_PWD" -i 0