cleanup some

This commit is contained in:
qvqc 2021-08-03 07:54:27 -04:00
parent 2285e67b74
commit 7fe9a99625
No known key found for this signature in database
GPG Key ID: 9EB04103C6BE892D
1 changed files with 23 additions and 24 deletions

View File

@ -1,4 +1,3 @@
## wow color ## wow color
export NEWT_COLORS=' export NEWT_COLORS='
root=magenta,cyan root=magenta,cyan
@ -11,16 +10,17 @@ button=yellow,magenta
' '
if (whiptail --title "Solo Miners Alliance Network" --yesno "This will install Wownero and add peers according to Wownero Solo Miners Alliance (https://forum.wownero.com/t/solo-miners-alliance-network/746)" --yes-button "Continue" --no-button "Exit" 8 78); then if (whiptail --title "Solo Miners Alliance Network" --yesno "This will install Wownero and add peers according to Wownero Solo Miners Alliance (https://forum.wownero.com/t/solo-miners-alliance-network/746)" --yes-button "Continue" --no-button "Exit" 8 78); then
> /tmp/wow-sman.log
else else
exit exit
fi fi
## add packages for install ## add packages for install
sudo apt install ansible pip libffi-dev curl git build-essential cmake libuv1-dev libssl-dev libhwloc-dev uuid-dev | whiptail --title 'Solo Miners Alliance Network' --gauge 'Adding packages.. ansible pip libffi-dev curl git' 6 60 10 sudo apt install ansible pip libffi-dev curl git build-essential cmake libuv1-dev libssl-dev libhwloc-dev uuid-dev -y &> /tmp/wow-sman.log | whiptail --title 'Solo Miners Alliance Network' --gauge 'Adding packages.. ansible pip libffi-dev curl git' 6 60 10
## grab ansible playbook ## grab ansible playbook
git https://git.wownero.com/qvqc/ansible-remote-node | whiptail --title 'Solo Miners Alliance Network' --gauge 'Adding packages.. ansible pip libffi-dev curl git' 6 60 30 git clone https://git.wownero.com/qvqc/ansible-remote-node &> /tmp/wow-sman.log | whiptail --title 'Solo Miners Alliance Network' --gauge 'Adding packages.. ansible pip libffi-dev curl git' 6 60 30
cd ansible-remote-node | whiptail --title 'Solo Miners Alliance Network' --gauge 'Add Alliance Peers' 6 60 40 cd ansible-remote-node
## add Alliance Network Nodes here ## add Alliance Network Nodes here
@ -44,7 +44,7 @@ add-peer=rkel2qy7xv3cc5bnxfrzwgh3jvd4woagd4vlhr3qsdxy6cfkimnq.b32.i2p:34565
EOT EOT
## setup pip dep ## setup pip dep
sudo pip install -r requirements.txt | whiptail --title 'Solo Miners Alliance Network' --gauge 'Setup Ansible' 6 60 40 sudo pip install -r requirements.txt &> /tmp/wow-sman.log | whiptail --title 'Solo Miners Alliance Network' --gauge 'Setup Ansible' 6 60 40
## wipe and set inventory to localhost ## wipe and set inventory to localhost
> inventory.ini | whiptail --title 'Solo Miners Alliance Network' --gauge 'Setup Ansible' 6 60 40 > inventory.ini | whiptail --title 'Solo Miners Alliance Network' --gauge 'Setup Ansible' 6 60 40
@ -52,30 +52,32 @@ echo "[all]" >> inventory.ini | whiptail --title 'Solo Miners Alliance Network'
echo "localhost ansible_connection=local" >> inventory.ini | whiptail --title 'Solo Miners Alliance Network' --gauge 'Setup Ansible' 6 60 40 echo "localhost ansible_connection=local" >> inventory.ini | whiptail --title 'Solo Miners Alliance Network' --gauge 'Setup Ansible' 6 60 40
## run playbook ## run playbook
ansible-playbook -i inventory.ini site.yaml -b | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Wownero, Tor, i2pd' 6 60 70 ansible-playbook -i inventory.ini site.yaml -b &> /tmp/wow-sman.log | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Wownero, Tor, i2pd' 6 60 70
## getting local node info ## getting local node info
i2pP2P=$( curl http://127.0.0.1:7070/?page=i2p_tunnels 2>&1 | grep -Eo "[a-zA-Z0-9./?=_%:-]*" | grep "34565" ) | whiptail --title 'Solo Miners Alliance Network' --gauge 'Getting i2pd Info' 6 60 80 i2pP2P=$( curl http://127.0.0.1:7070/?page=i2p_tunnels 2>&1 | grep -Eo "[a-zA-Z0-9./?=_%:-]*" | grep "34565" )
i2pRPC=$( curl http://127.0.0.1:7070/?page=i2p_tunnels 2>&1 | grep -Eo "[a-zA-Z0-9./?=_%:-]*" | grep "34568" ) | whiptail --title 'Solo Miners Alliance Network' --gauge 'Getting i2pd Info' 6 60 85 i2pRPC=$( curl http://127.0.0.1:7070/?page=i2p_tunnels 2>&1 | grep -Eo "[a-zA-Z0-9./?=_%:-]*" | grep "34568" )
torRPCP2P=$( cat /var/lib/tor/wownero/hostname ) | whiptail --title 'Solo Miners Alliance Network' --gauge 'Getting Tor info' 6 60 90 torRPCP2P=$( cat /var/lib/tor/wownero/hostname )
## add xmrig ## add xmrig
git clone https://github.com/xmrig/xmrig.git /tmp/xmrig | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 93 git clone https://github.com/xmrig/xmrig.git /tmp/xmrig | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 93
mkdir /tmp/xmrig/build && cd /tmp/xmrig/build | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 93 sudo mkdir /tmp/xmrig/build | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 94
cmake .. | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 94 cd /tmp/xmrig/build | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 94
make -j$(nproc) | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 95 sudo cmake .. | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 94
make install | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 95 sudo make -j$(nproc) | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 95
sudo cp -a /tmp/xmrig/build/xmrig /usr/local/bin/xmrig| whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 95
## add xmrig-proxy ## add xmrig-proxy
git clone https://github.com/xmrig/xmrig-proxy.git /tmp/xmrig-proxy | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 96 git clone https://github.com/xmrig/xmrig-proxy.git /tmp/xmrig-proxy &> /tmp/wow-sman.log| whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 96
mkdir /tmp/xmrig-proxy/build | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 96 mkdir /tmp/xmrig-proxy/build
cd /tmp/xmrig-proxy/build | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 96 cd /tmp/xmrig-proxy/build
cmake .. | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 97 sudo cmake .. &> /tmp/wow-sman.log| whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 97
make -j$(nproc) | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 98 sudo make -j$(nproc) &> /tmp/wow-sman.log | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 98
make install | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig-Proxy' 6 60 99 sudo cp -a /tmp/xmrig-proxy/build/xmrig-proxy /usr/local/bin/xmrig-proxy | whiptail --title 'Solo Miners Alliance Network' --gauge 'Installing Xmrig' 6 60 95
## display node information ## display node information
cat <<EOT >> roles/wownerod/templates/wownerod.conf.j2 | whiptail --title 'Solo Miners Alliance Network' --gauge 'Finishing Up..' 6 60 100 > /tmp/WelcomeAlliance
cat <<EOT >> /tmp/WelcomeAlliance | whiptail --title 'Solo Miners Alliance Network' --gauge 'Finishing Up..' 6 60 100
Welcome to the Wownero Solo Miners Alliance Network Welcome to the Wownero Solo Miners Alliance Network
ADD RPC URLs TO ADD RPC URLs TO
@ -91,7 +93,4 @@ YOUR TOR P2P/RPC ADDRESS ( :34566 / :34568 )
$torRPCP2P $torRPCP2P
EOT EOT
whiptail --title "Solo Miners Alliance Network" --textbox /tmp/WelcomeAlliance 40 80 whiptail --title "Solo Miners Alliance Network" --textbox /tmp/WelcomeAlliance 20 70