-
Notifications
You must be signed in to change notification settings - Fork 44
/
update-monero-lws.sh
53 lines (49 loc) · 2.31 KB
/
update-monero-lws.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
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#(1) Define variables and updater functions
#Error Log:
touch /home/pinodexmr/debug.log
echo "
####################
" 2>&1 | tee -a /home/pinodexmr/debug.log
echo "Start setup-update-monero-lws.sh script $(date)" 2>&1 | tee -a /home/pinodexmr/debug.log
echo "
####################
" 2>&1 | tee -a /home/pinodexmr/debug.log
#Stop Monero-lws service (if started)
echo -e "\e[32mStop Monero-lws service (if started)\e[0m"
sudo systemctl stop monero-lws.service
##Delete old version
echo -e "\e[32mDelete old version\e[0m"
rm -rf /home/pinodexmr/monero-lws/ 2>&1 | tee -a /home/pinodexmr/debug.log
echo -e "\e[32mSuccess\e[0m"
sleep "2"
echo -e "\e[32mDownloading and Building new Monero-LWS\e[0m"
#Check dependencies (Should be installed already from Monero install)
sudo apt update && sudo apt install build-essential cmake libboost-all-dev libssl-dev libzmq3-dev doxygen graphviz -y 2>&1 | tee -a /home/pinodexmr/debug.log
echo -e "\e[32mDownloading VTNerd Monero-LWS\e[0m"
sleep 2
git clone --recursive https://github.com/vtnerd/monero-lws.git; 2>&1 | tee -a /home/pinodexmr/debug.log
echo -e "\e[32mConfiguring install\e[0m"
sleep 2
cd monero-lws
git checkout release-v0.2_0.18 2>&1 | tee -a /home/pinodexmr/debug.log
mkdir build && cd build
cmake -DMONERO_SOURCE_DIR=/home/pinodexmr/monero -DMONERO_BUILD_DIR=/home/pinodexmr/monero/build/release .. 2>&1 | tee -a /home/pinodexmr/debug.log
echo -e "\e[32mBuilding VTNerd Monero-LWS\e[0m"
sleep 2
make 2>&1 | tee -a /home/pinodexmr/debug.log
cd
#Restarting Monero-LWS servcice
sudo systemctl start monero-lws.service
#Update system reference current LWS version number to New version number
chmod 755 /home/pinodexmr/new-ver-lws.sh
. /home/pinodexmr/new-ver-lws.sh
echo "#!/bin/bash
CURRENT_VERSION_LWS=$NEW_VERSION_LWS" > /home/pinodexmr/current-ver-lws.sh 2>&1 | tee -a /home/pinodexmr/debug.log
##End debug log
echo "Update Complete" 2>&1 | tee -a /home/pinodexmr/debug.log
sleep 5
echo "####################" 2>&1 | tee -a /home/pinodexmr/debug.log
echo "End setup-update-monero-lws.sh script $(date)" 2>&1 | tee -a /home/pinodexmr/debug.log
echo "####################" 2>&1 | tee -a /home/pinodexmr/debug.log
whiptail --title "Monero-LWS Updater" --msgbox "\nThe Monero-LWS installation is complete and SSL certificates have been preserved.\n\nReturning to Menu..." 20 78