forked from Gingeropolous/monerodo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmonero_update.sh
executable file
·34 lines (30 loc) · 945 Bytes
/
monero_update.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
#!/bin/bash
# Monero Update script
cd /home/bob/monerodo/
git pull
chmod +x *.sh
./dep_list.sh
#All the below commented code will eventually be used to adjust for different hardware settings. For now, 1 thread is most stable.
#proc=1 #modify to use script below if unit has more memory
#Determine number of available hardware threads
#Commented out because of memory requirements for multiple threads
#proc=$(nproc)
#if [ $proc != 1 ]
# then
# proc=$[$proc/2]
# else
# $proc=1
# fi
#MEM=`free -m | grep Mem | awk '{print $2}'`
#GBMEM=$[$MEM/1000]
#echo $GBMEM
#Pull repository for updates and compile
cd /home/bob/bitmonero
git pull
make
# Copy binaries to /bin
#Restart service to use new binaries
sudo service mos_bitmonero stop
sudo cp /home/bob/bitmonero/build/release/bin/bitmonerod /bin
sudo cp /home/bob/bitmonero/build/release/bin/simplewallet /bin
sudo service mos_bitmonero start