-
Notifications
You must be signed in to change notification settings - Fork 13
/
cpu_mining.sh
executable file
·42 lines (34 loc) · 1.3 KB
/
cpu_mining.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
#MONERODO CPU mining setup
#Pretty sure this script isn't used 20160219
#echo "More complex mining settings coming soon (like mining to the pool hosted on the Monerodo)"
#echo "For now, you can simply start monero-wallet-cli from the main menu. Once loaded, type start_mining"
#echo "Donate to Monerodo development 44UW4sPKb4XbWHm8PXr6K8GQi7jUs9i7t2mTsjDn2zK7jYZwNERfoHaC1Yy4PYs1eTCZ9766hkB6RLUf1y95EvCQNpCZnuu"
#echo "Or work on Monerodo yourself! https://github.com/Gingeropolous/monerodo "
cd /home/bob/monerodo/conf_files/
rm mos_cpuminer.conf
#Use half of available cores for CPU mining
n=$(nproc)
if [$n !== 1]
then
$n = $n / 2
fi
# Write upstart file depending on whether AES is available or not
less /proc/cpuinfo > cpuinfo.txt
if [ $"grep aes cpuinfo.txt" ] ;
then echo -e "start on started mos_poolnode \n\
stop on stopping poolnode \n\
console log \n\
chdir /monerodo/cpuminer/cpuminer-multi/ \n\
exec ./minerd -a cryptonight -o stratum+tcp://$current_ip:3333 -u $mine_add -p x -t $n \n\
" > mos_cpuminer.conf
else
echo -e "start on started mos_poolnode \n\
stop on stopping poolnode \n\
console log \n\
chdir /monerodo/yam/ \n\
exec ./yam -c x -M stratum+tcp://$mine_add:x@$current_ip:3333/xmr \n\
" > mos_cpuminer.conf
echo "Settings have been updated"
echo "Press return to continue"
read go