-
Notifications
You must be signed in to change notification settings - Fork 13
/
monero_update.sh
executable file
·43 lines (39 loc) · 1.12 KB
/
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
35
36
37
38
39
40
41
42
43
#!/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
DIRECTORY="/home/bob/bitmonero"
if [ -d "$DIRECTORY" ]; then
cd /home/bob/bitmonero
git pull
make
else
cd /home/bob/
git clone https://github.com/monero-project/bitmonero.git
cd /home/bob/bitmonero
git pull
make
fi
# Copy binaries to /bin
#Restart service to use new binaries
sudo service mos_bitmonero stop
sudo cp /home/bob/bitmonero/build/release/bin/monerod /bin
sudo cp /home/bob/bitmonero/build/release/bin/monero-wallet-cli /bin
sudo service mos_bitmonero start