40 changed files with 395 additions and 73 deletions
@ -1,2 +1,2 @@ |
|||
#!/bin/bash |
|||
curl --url "http://127.0.0.1:7776" --data "{\"coin\":\""${1}"\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"50000\",\"sendflag\":1,\"duplicates\":"${2}"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"coin\":\""${1}"\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"10000\",\"sendflag\":1,\"duplicates\":"${2}"}" |
|||
|
@ -1,2 +0,0 @@ |
|||
curl --url "http://127.0.0.1:7776" --data "{\"pubkey\":\"$pubkey\",\"agent\":\"dpow\",\"method\":\"notarizations\",\"symbol\":\"PIZZA\",\"height\":5000,\"numblocks\":1000}" |
|||
|
@ -1 +0,0 @@ |
|||
curl --url "http://127.0.0.1:7778" --data "{\"conf\":\"BEER.conf\",\"path\":\"${HOME#"/"}/.komodo/BEER\",\"unitval\":\"20\",\"zcash\":1,\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":8,\"newcoin\":\"BEER\",\"name\":\"BEER\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"9fecbb6e\",\"p2p\":8922,\"rpc\":8923,\"pubval\":60,\"p2shval\":85,\"wifval\":188,\"txfee_satoshis\":\"10000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71\",\"protover\":170002,\"genesisblock\":\"0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000000000000000000000000000000000000000000000000000000000000029ab5f490f0f0f200b00000000000000000000000000000000000000000000000000000000000000fd4005000d5ba7cda5d473947263bf194285317179d2b0d307119c2e7cc4bd8ac456f0774bd52b0cd9249be9d40718b6397a4c7bbd8f2b3272fed2823cd2af4bd1632200ba4bf796727d6347b225f670f292343274cc35099466f5fb5f0cd1c105121b28213d15db2ed7bdba490b4cedc69742a57b7c25af24485e523aadbb77a0144fc76f79ef73bd8530d42b9f3b9bed1c135ad1fe152923fafe98f95f76f1615e64c4abb1137f4c31b218ba2782bc15534788dda2cc08a0ee2987c8b27ff41bd4e31cd5fb5643dfe862c9a02ca9f90c8c51a6671d681d04ad47e4b53b1518d4befafefe8cadfb912f3d03051b1efbf1dfe37b56e93a741d8dfd80d576ca250bee55fab1311fc7b3255977558cdda6f7d6f875306e43a14413facdaed2f46093e0ef1e8f8a963e1632dcbeebd8e49fd16b57d49b08f9762de89157c65233f60c8e38a1f503a48c555f8ec45dedecd574a37601323c27be597b956343107f8bd80f3a925afaf30811df83c402116bb9c1e5231c70fff899a7c82f73c902ba54da53cc459b7bf1113db65cc8f6914d3618560ea69abd13658fa7b6af92d374d6eca9529f8bd565166e4fcbf2a8dfb3c9b69539d4d2ee2e9321b85b331925df195915f2757637c2805e1d4131e1ad9ef9bc1bb1c732d8dba4738716d351ab30c996c8657bab39567ee3b29c6d054b711495c0d52e1cd5d8e55b4f0f0325b97369280755b46a02afd54be4ddd9f77c22272b8bbb17ff5118fedbae2564524e797bd28b5f74f7079d532ccc059807989f94d267f47e724b3f1ecfe00ec9e6541c961080d8891251b84b4480bc292f6a180bea089fef5bbda56e1e41390d7c0e85ba0ef530f7177413481a226465a36ef6afe1e2bca69d2078712b3912bba1a99b1fbff0d355d6ffe726d2bb6fbc103c4ac5756e5bee6e47e17424ebcbf1b63d8cb90ce2e40198b4f4198689daea254307e52a25562f4c1455340f0ffeb10f9d8e914775e37d0edca019fb1b9c6ef81255ed86bc51c5391e0591480f66e2d88c5f4fd7277697968656a9b113ab97f874fdd5f2465e5559533e01ba13ef4a8f7a21d02c30c8ded68e8c54603ab9c8084ef6d9eb4e92c75b078539e2ae786ebab6dab73a09e0aa9ac575bcefb29e930ae656e58bcb513f7e3c17e079dce4f05b5dbc18c2a872b22509740ebe6a3903e00ad1abc55076441862643f93606e3dc35e8d9f2caef3ee6be14d513b2e062b21d0061de3bd56881713a1a5c17f5ace05e1ec09da53f99442df175a49bd154aa96e4949decd52fed79ccf7ccbce32941419c314e374e4a396ac553e17b5340336a1a25c22f9e42a243ba5404450b650acfc826a6e432971ace776e15719515e1634ceb9a4a35061b668c74998d3dfb5827f6238ec015377e6f9c94f38108768cf6e5c8b132e0303fb5a200368f845ad9d46343035a6ff94031df8d8309415bb3f6cd5ede9c135fdabcc030599858d803c0f85be7661c88984d88faa3d26fb0e9aac0056a53f1b5d0baed713c853c4a2726869a0a124a8a5bbc0fc0ef80c8ae4cb53636aa02503b86a1eb9836fcc259823e2692d921d88e1ffc1e6cb2bde43939ceb3f32a611686f539f8f7c9f0bf00381f743607d40960f06d347d1cd8ac8a51969c25e37150efdf7aa4c2037a2fd0516fb444525ab157a0ed0a7412b2fa69b217fe397263153782c0f64351fbdf2678fa0dc8569912dcd8e3ccad38f34f23bbbce14c6a26ac24911b308b82c7e43062d180baeac4ba7153858365c72c63dcf5f6a5b08070b730adb017aeae925b7d0439979e2679f45ed2f25a7edcfd2fb77a8794630285ccb0a071f5cce410b46dbf9750b0354aae8b65574501cc69efb5b6a43444074fee116641bb29da56c2b4a7f456991fc92b2\",\"debug\":0,\"seedipaddr\":\"78.47.196.146\"}" |
@ -1 +0,0 @@ |
|||
curl --url "http://127.0.0.1:7778" --data "{\"conf\":\"PIZZA.conf\",\"path\":\"${HOME#"/"}/.komodo/PIZZA\",\"unitval\":\"20\",\"zcash\":1,\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":8,\"newcoin\":\"PIZZA\",\"name\":\"PIZZA\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"adbe523c\",\"p2p\":11607,\"rpc\":11608,\"pubval\":60,\"p2shval\":85,\"wifval\":188,\"txfee_satoshis\":\"10000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71\",\"protover\":170002,\"genesisblock\":\"0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000000000000000000000000000000000000000000000000000000000000029ab5f490f0f0f200b00000000000000000000000000000000000000000000000000000000000000fd4005000d5ba7cda5d473947263bf194285317179d2b0d307119c2e7cc4bd8ac456f0774bd52b0cd9249be9d40718b6397a4c7bbd8f2b3272fed2823cd2af4bd1632200ba4bf796727d6347b225f670f292343274cc35099466f5fb5f0cd1c105121b28213d15db2ed7bdba490b4cedc69742a57b7c25af24485e523aadbb77a0144fc76f79ef73bd8530d42b9f3b9bed1c135ad1fe152923fafe98f95f76f1615e64c4abb1137f4c31b218ba2782bc15534788dda2cc08a0ee2987c8b27ff41bd4e31cd5fb5643dfe862c9a02ca9f90c8c51a6671d681d04ad47e4b53b1518d4befafefe8cadfb912f3d03051b1efbf1dfe37b56e93a741d8dfd80d576ca250bee55fab1311fc7b3255977558cdda6f7d6f875306e43a14413facdaed2f46093e0ef1e8f8a963e1632dcbeebd8e49fd16b57d49b08f9762de89157c65233f60c8e38a1f503a48c555f8ec45dedecd574a37601323c27be597b956343107f8bd80f3a925afaf30811df83c402116bb9c1e5231c70fff899a7c82f73c902ba54da53cc459b7bf1113db65cc8f6914d3618560ea69abd13658fa7b6af92d374d6eca9529f8bd565166e4fcbf2a8dfb3c9b69539d4d2ee2e9321b85b331925df195915f2757637c2805e1d4131e1ad9ef9bc1bb1c732d8dba4738716d351ab30c996c8657bab39567ee3b29c6d054b711495c0d52e1cd5d8e55b4f0f0325b97369280755b46a02afd54be4ddd9f77c22272b8bbb17ff5118fedbae2564524e797bd28b5f74f7079d532ccc059807989f94d267f47e724b3f1ecfe00ec9e6541c961080d8891251b84b4480bc292f6a180bea089fef5bbda56e1e41390d7c0e85ba0ef530f7177413481a226465a36ef6afe1e2bca69d2078712b3912bba1a99b1fbff0d355d6ffe726d2bb6fbc103c4ac5756e5bee6e47e17424ebcbf1b63d8cb90ce2e40198b4f4198689daea254307e52a25562f4c1455340f0ffeb10f9d8e914775e37d0edca019fb1b9c6ef81255ed86bc51c5391e0591480f66e2d88c5f4fd7277697968656a9b113ab97f874fdd5f2465e5559533e01ba13ef4a8f7a21d02c30c8ded68e8c54603ab9c8084ef6d9eb4e92c75b078539e2ae786ebab6dab73a09e0aa9ac575bcefb29e930ae656e58bcb513f7e3c17e079dce4f05b5dbc18c2a872b22509740ebe6a3903e00ad1abc55076441862643f93606e3dc35e8d9f2caef3ee6be14d513b2e062b21d0061de3bd56881713a1a5c17f5ace05e1ec09da53f99442df175a49bd154aa96e4949decd52fed79ccf7ccbce32941419c314e374e4a396ac553e17b5340336a1a25c22f9e42a243ba5404450b650acfc826a6e432971ace776e15719515e1634ceb9a4a35061b668c74998d3dfb5827f6238ec015377e6f9c94f38108768cf6e5c8b132e0303fb5a200368f845ad9d46343035a6ff94031df8d8309415bb3f6cd5ede9c135fdabcc030599858d803c0f85be7661c88984d88faa3d26fb0e9aac0056a53f1b5d0baed713c853c4a2726869a0a124a8a5bbc0fc0ef80c8ae4cb53636aa02503b86a1eb9836fcc259823e2692d921d88e1ffc1e6cb2bde43939ceb3f32a611686f539f8f7c9f0bf00381f743607d40960f06d347d1cd8ac8a51969c25e37150efdf7aa4c2037a2fd0516fb444525ab157a0ed0a7412b2fa69b217fe397263153782c0f64351fbdf2678fa0dc8569912dcd8e3ccad38f34f23bbbce14c6a26ac24911b308b82c7e43062d180baeac4ba7153858365c72c63dcf5f6a5b08070b730adb017aeae925b7d0439979e2679f45ed2f25a7edcfd2fb77a8794630285ccb0a071f5cce410b46dbf9750b0354aae8b65574501cc69efb5b6a43444074fee116641bb29da56c2b4a7f456991fc92b2\",\"debug\":0,\"seedipaddr\":\"78.47.196.146\"}" |
@ -1 +0,0 @@ |
|||
curl --url "http://127.0.0.1:7778" --data "{\"conf\":\"VOTE2018.conf\",\"path\":\"${HOME#"/"}/.komodo/VOTE2018\",\"unitval\":\"20\",\"zcash\":1,\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":8,\"newcoin\":\"VOTE2018\",\"name\":\"VOTE2018\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"e6f918ae\",\"p2p\":10316,\"rpc\":10317,\"pubval\":60,\"p2shval\":85,\"wifval\":188,\"txfee_satoshis\":\"10000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71\",\"protover\":170002,\"genesisblock\":\"0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000000000000000000000000000000000000000000000000000000000000029ab5f490f0f0f200b00000000000000000000000000000000000000000000000000000000000000fd4005000d5ba7cda5d473947263bf194285317179d2b0d307119c2e7cc4bd8ac456f0774bd52b0cd9249be9d40718b6397a4c7bbd8f2b3272fed2823cd2af4bd1632200ba4bf796727d6347b225f670f292343274cc35099466f5fb5f0cd1c105121b28213d15db2ed7bdba490b4cedc69742a57b7c25af24485e523aadbb77a0144fc76f79ef73bd8530d42b9f3b9bed1c135ad1fe152923fafe98f95f76f1615e64c4abb1137f4c31b218ba2782bc15534788dda2cc08a0ee2987c8b27ff41bd4e31cd5fb5643dfe862c9a02ca9f90c8c51a6671d681d04ad47e4b53b1518d4befafefe8cadfb912f3d03051b1efbf1dfe37b56e93a741d8dfd80d576ca250bee55fab1311fc7b3255977558cdda6f7d6f875306e43a14413facdaed2f46093e0ef1e8f8a963e1632dcbeebd8e49fd16b57d49b08f9762de89157c65233f60c8e38a1f503a48c555f8ec45dedecd574a37601323c27be597b956343107f8bd80f3a925afaf30811df83c402116bb9c1e5231c70fff899a7c82f73c902ba54da53cc459b7bf1113db65cc8f6914d3618560ea69abd13658fa7b6af92d374d6eca9529f8bd565166e4fcbf2a8dfb3c9b69539d4d2ee2e9321b85b331925df195915f2757637c2805e1d4131e1ad9ef9bc1bb1c732d8dba4738716d351ab30c996c8657bab39567ee3b29c6d054b711495c0d52e1cd5d8e55b4f0f0325b97369280755b46a02afd54be4ddd9f77c22272b8bbb17ff5118fedbae2564524e797bd28b5f74f7079d532ccc059807989f94d267f47e724b3f1ecfe00ec9e6541c961080d8891251b84b4480bc292f6a180bea089fef5bbda56e1e41390d7c0e85ba0ef530f7177413481a226465a36ef6afe1e2bca69d2078712b3912bba1a99b1fbff0d355d6ffe726d2bb6fbc103c4ac5756e5bee6e47e17424ebcbf1b63d8cb90ce2e40198b4f4198689daea254307e52a25562f4c1455340f0ffeb10f9d8e914775e37d0edca019fb1b9c6ef81255ed86bc51c5391e0591480f66e2d88c5f4fd7277697968656a9b113ab97f874fdd5f2465e5559533e01ba13ef4a8f7a21d02c30c8ded68e8c54603ab9c8084ef6d9eb4e92c75b078539e2ae786ebab6dab73a09e0aa9ac575bcefb29e930ae656e58bcb513f7e3c17e079dce4f05b5dbc18c2a872b22509740ebe6a3903e00ad1abc55076441862643f93606e3dc35e8d9f2caef3ee6be14d513b2e062b21d0061de3bd56881713a1a5c17f5ace05e1ec09da53f99442df175a49bd154aa96e4949decd52fed79ccf7ccbce32941419c314e374e4a396ac553e17b5340336a1a25c22f9e42a243ba5404450b650acfc826a6e432971ace776e15719515e1634ceb9a4a35061b668c74998d3dfb5827f6238ec015377e6f9c94f38108768cf6e5c8b132e0303fb5a200368f845ad9d46343035a6ff94031df8d8309415bb3f6cd5ede9c135fdabcc030599858d803c0f85be7661c88984d88faa3d26fb0e9aac0056a53f1b5d0baed713c853c4a2726869a0a124a8a5bbc0fc0ef80c8ae4cb53636aa02503b86a1eb9836fcc259823e2692d921d88e1ffc1e6cb2bde43939ceb3f32a611686f539f8f7c9f0bf00381f743607d40960f06d347d1cd8ac8a51969c25e37150efdf7aa4c2037a2fd0516fb444525ab157a0ed0a7412b2fa69b217fe397263153782c0f64351fbdf2678fa0dc8569912dcd8e3ccad38f34f23bbbce14c6a26ac24911b308b82c7e43062d180baeac4ba7153858365c72c63dcf5f6a5b08070b730adb017aeae925b7d0439979e2679f45ed2f25a7edcfd2fb77a8794630285ccb0a071f5cce410b46dbf9750b0354aae8b65574501cc69efb5b6a43444074fee116641bb29da56c2b4a7f456991fc92b2\",\"debug\":0,\"seedipaddr\":\"78.47.196.146\"}" |
@ -1,20 +0,0 @@ |
|||
#!/bin/bash |
|||
seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'` |
|||
source testlist |
|||
source pubkey.txt |
|||
args=("$@") |
|||
count=0 |
|||
delay=20 |
|||
while [ "x${coinlist[count]}" != "x" ] |
|||
do |
|||
all=${coinlist[count]} |
|||
name=${all%% *} |
|||
supply=`expr "$all" : '.* \(.*\)'` |
|||
if [ "$name" != "" ] |
|||
then |
|||
gen=" -gen" |
|||
komodod -pubkey=$pubkey -ac_name=$name -ac_supply=$supply -addnode=$seed_ip $gen $args & |
|||
sleep $delay |
|||
fi |
|||
count=$(( $count +1 )) |
|||
done |
@ -1 +0,0 @@ |
|||
pubkey=0244ef4a6b38ed112a0c50754cfe9eca8ecbef15c87cda86c1b2157e1a4545c962 |
@ -1,11 +1,6 @@ |
|||
#!/bin/bash |
|||
source ~/komodo/src/pubkey.txt |
|||
echo "Starting Bitcoin" |
|||
bitcoind & |
|||
sleep 10 |
|||
echo "Starting Chips" |
|||
chipsd & |
|||
sleep 10 |
|||
echo "Starting Komodo" |
|||
komodod |
|||
#-notary -pubkey=$pubkey |
|||
komodod -notary -pubkey=$pubkey |
|||
echo "Starting PIZZA" |
|||
./startassets |
|||
|
@ -1,11 +0,0 @@ |
|||
#!/bin/bash |
|||
IFS= |
|||
cd ~/komodo/src |
|||
now=$(date +"%Y-%m-%d %T%z") |
|||
printf "$now \n"; |
|||
format="%-10s %8s %8s %8s %12s\n" |
|||
printf "$format" "-ASSET-" "-NTRZd-" "-UTXOs-" "-BLOX-" "-BAL-"; |
|||
printf "$format" "BTC" "-" "$(bitcoin-cli listunspent | grep .0005 | wc -l)" "-" "$(bitcoin-cli getwalletinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')"; |
|||
printf "$format" "KMD" "-" "$(./komodo-cli listunspent | grep .0005 | wc -l)" "$(./komodo-cli getinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(./komodo-cli getinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')" |
|||
printf "$format" "BEER" "$(./komodo-cli -ac_name=BEER listtransactions "" 77777 | grep -- -0.00418000 | wc -l)" "$(./komodo-cli -ac_name=BEER listunspent | grep .0005 | wc -l)" "$(./komodo-cli -ac_name=BEER getinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(./komodo-cli -ac_name=BEER getinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')" |
|||
printf "$format" "PIZZA" "$(./komodo-cli -ac_name=PIZZA listtransactions "" 77777 | grep -- -0.00418000 | wc -l)" "$(./komodo-cli -ac_name=PIZZA listunspent | grep .0005 | wc -l)" "$(./komodo-cli -ac_name=PIZZA getinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(./komodo-cli -ac_name=PIZZA getinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')" |
@ -1,4 +1,3 @@ |
|||
coinlist=( |
|||
'PIZZA 100000000' |
|||
'BEER 100000000' |
|||
) |
|||
|
@ -0,0 +1,19 @@ |
|||
Scripts I like to keep handy for running my node. |
|||
|
|||
Script Name | Function |
|||
----------- | -------- |
|||
**acsplit** | Create UTXOs as needed although Iguana handles this as long as you didn't hit the base58 lottery |
|||
**coinlist** | Handy way to keep coin list in one place for other scripts to use (thanks to a-team) |
|||
**fail2banstatusall** | Get stats of fail2ban jails |
|||
**freshubuntu** | Run this for initial setup of your server for basic security needs (generalized on purpose so it can be used on any server) |
|||
**killthemall** | Hard kill komodo related processes |
|||
**killthemsoftly** | Kill komodo processes nicely |
|||
**kmdacfirewall** | UFW settings with commentary |
|||
**networktweaksundo.txt** | Reference to my default Ubuntu 16.04 net config "just in case" |
|||
**notary** | Start notary process |
|||
**notarytest** | Start notary test process |
|||
**rebuildkomodo** | Git pull and rebuild komodo on the current branch |
|||
**start** | Start chipsd and komodod |
|||
**startac** | Start assetchains |
|||
**stats** | Fancy cli stats for notary nodes |
|||
|
@ -1,2 +1,2 @@ |
|||
#!/bin/bash |
|||
curl --url "http://127.0.0.1:7776" --data "{\"coin\":\""${1}"\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"50000\",\"sendflag\":1,\"duplicates\":"${2}"}" |
|||
curl --url "http://127.0.0.1:7776" --data "{\"coin\":\""${1}"\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"10000\",\"sendflag\":1,\"duplicates\":"${2}"}" |
@ -0,0 +1,7 @@ |
|||
#!/bin/bash |
|||
|
|||
JAILS=`sudo fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` |
|||
for JAIL in $JAILS |
|||
do |
|||
sudo fail2ban-client status $JAIL |
|||
done |
@ -0,0 +1,116 @@ |
|||
#!/bin/bash |
|||
|
|||
if [ "$EUID" -ne 0 ] |
|||
then |
|||
echo -e "\e[41mPlease use sudo or run as root...\e[0m" |
|||
exit |
|||
fi |
|||
|
|||
read -p "Configure timezone & locale? (y/n) " -n 1 DOLOCALE |
|||
echo |
|||
if [[ $DOLOCALE =~ ^[Yy]$ ]] |
|||
then |
|||
dpkg-reconfigure tzdata |
|||
dpkg-reconfigure locales |
|||
fi |
|||
|
|||
read -p "Upgrade packages? (y/n) " -n 1 DOUPGRADES |
|||
echo |
|||
if [[ $DOUPGRADES =~ ^[Yy]$ ]] |
|||
then |
|||
apt-get update && apt-get -y dist-upgrade |
|||
fi |
|||
|
|||
read -p "Install extra tools? (y/n) " -n 1 DOEXTRAS |
|||
echo |
|||
if [[ $DOEXTRAS =~ ^[Yy]$ ]] |
|||
then |
|||
apt -y install fail2ban ufw git curl bash-completion htop jq |
|||
fi |
|||
|
|||
read -p "Update hostname? (y/n) " -n 1 DOHOSTNAME |
|||
echo |
|||
if [[ $DOHOSTNAME =~ ^[Yy]$ ]] |
|||
then |
|||
read -p "Enter hostname: " NEWHOSTNAME |
|||
echo "$NEWHOSTNAME" > /etc/hostname |
|||
sed -i "1i127.0.0.1 ${NEWHOSTNAME}" /etc/hosts |
|||
fi |
|||
|
|||
read -p "Disable IPV6? (y/n) " -n 1 DOIPV6 |
|||
echo |
|||
|
|||
if [[ $DOIPV6 =~ ^[Yy]$ ]] |
|||
then |
|||
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf |
|||
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf |
|||
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf |
|||
sysctl -p |
|||
fi |
|||
|
|||
read -p "Configure UFW? (This will only allow incoming port 22) (y/n) " -n 1 DOUFW |
|||
echo |
|||
if [[ $DOUFW =~ ^[Yy]$ ]] |
|||
then |
|||
ufw default deny incoming |
|||
ufw default allow outgoing |
|||
ufw allow 22 comment 'SSH' |
|||
ufw enable |
|||
systemctl enable ufw |
|||
ufw status |
|||
fi |
|||
|
|||
read -p "Add non-root sudo user? (y/n) " -n 1 DONONROOT |
|||
echo |
|||
if [[ $DONONROOT =~ ^[Yy]$ ]] |
|||
then |
|||
read -p "Enter user name: " NEWUSERNAME |
|||
echo |
|||
useradd -m $NEWUSERNAME |
|||
adduser $NEWUSERNAME sudo |
|||
passwd $NEWUSERNAME |
|||
sudo chsh $NEWUSERNAME -s /bin/bash |
|||
|
|||
grep -q "^[#]*force_color_prompt=" /home/$NEWUSERNAME/.bashrc && sed -i "/^[#]*force_color_prompt=/c\force_color_prompt=yes" /home/$NEWUSERNAME/.bashrc |
|||
|
|||
source /home/$NEWUSERNAME/.bashrc |
|||
|
|||
read -p "Please enter the public key (and label if desired) for $NEWUSERNAME (not recommended: enter to skip): " NEWUSERPUBKEY |
|||
if [[ ! -z "$NEWUSERPUBKEY" ]] |
|||
then |
|||
mkdir -p /home/$NEWUSERNAME/.ssh/ |
|||
echo "ssh-rsa $NEWUSERPUBKEY" >> /home/$NEWUSERNAME/.ssh/authorized_keys |
|||
chmod -R 700 /home/$NEWUSERNAME/.ssh/ |
|||
chown -R $NEWUSERNAME:$NEWUSERNAME /home/$NEWUSERNAME/.ssh/ |
|||
|
|||
read -p "Copy key to root user? " -n 1 DOROOTKEY |
|||
if [[ $DOROOTKEY =~ ^[Yy]$ ]] |
|||
then |
|||
mkdir -p /root/.ssh |
|||
cp /home/$NEWUSERNAME/.ssh/authorized_keys /root/.ssh/ |
|||
chown -R root:root /root/.ssh/ |
|||
chmod -R 700 /root/.ssh/ |
|||
fi |
|||
fi |
|||
|
|||
read -p "Please login with the SSH key on the new user now to verify connectivity. Have you completed this? (y/n) " -n 1 TESTEDCONNECTIVITY |
|||
echo |
|||
if [[ $TESTEDCONNECTIVITY =~ ^[Yy]$ ]] |
|||
then |
|||
read -p "Disable root login? " -n 1 DOROOTDISABLE |
|||
echo |
|||
if [[ $DOROOTDISABLE =~ ^[Yy]$ ]] |
|||
then |
|||
grep -q "^[#]*PermitRootLogin" /etc/ssh/sshd_config && sed -i "/^[#]*PermitRootLogin/c\PermitRootLogin no" /etc/ssh/sshd_config || echo "PermitRootLogin no" >> /etc/ssh/sshd_config |
|||
fi |
|||
|
|||
grep -q "^[#]*PubkeyAuthentication" /etc/ssh/sshd_config && sed -i "/^[#]*PubkeyAuthentication/c\PubkeyAuthentication yes" /etc/ssh/sshd_config || echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config |
|||
grep -q "^[#]*ChallengeResponseAuthentication" /etc/ssh/sshd_config && sed -i "/^[#]*ChallengeResponseAuthentication/c\ChallengeResponseAuthentication no" /etc/ssh/sshd_config || echo "ChallengeResponseAuthentication no" >> /etc/ssh/sshd_config |
|||
grep -q "^[#]*PasswordAuthentication" /etc/ssh/sshd_config && sed -i "/^[#]*PasswordAuthentication/c\PasswordAuthentication no" /etc/ssh/sshd_config || echo "PasswordAuthentication no" >> /etc/ssh/sshd_config |
|||
|
|||
systemctl restart sshd.service |
|||
else |
|||
echo -e "\e[41mSorry, it won't be safe to do the final steps here then... take care.\e[0m" |
|||
fi |
|||
fi |
|||
|
@ -0,0 +1,4 @@ |
|||
#!/bin/bash |
|||
pkill -9 komodod |
|||
pkill -9 chipsd |
|||
pkill -9 iguana |
@ -0,0 +1,4 @@ |
|||
#!/bin/bash |
|||
pkill -9 komodod |
|||
pkill -9 chipsd |
|||
pkill -9 iguana |
@ -0,0 +1,5 @@ |
|||
#!/bin/bash |
|||
#komodo-cli stop |
|||
pkill -15 komodod |
|||
pkill -15 chipsd |
|||
pkill -15 iguana |
@ -0,0 +1,38 @@ |
|||
#!/bin/bash |
|||
sudo apt-get install ufw |
|||
sudo ufw disable |
|||
sudo ufw default deny incoming |
|||
sudo ufw allow 22 comment 'SSH port' |
|||
sudo ufw allow 7770 comment 'KMD port' |
|||
sudo ufw allow 7775 comment 'Iguana port' |
|||
sudo ufw allow 8333 comment 'BTC port' |
|||
sudo ufw allow 57777 comment 'CHIPS port' |
|||
sudo ufw allow 10195 comment 'REVS asset chain port' |
|||
sudo ufw allow 11340 comment 'SUPERNET asset chain port' |
|||
sudo ufw allow 11889 comment 'DEX asset chain port' |
|||
sudo ufw allow 14067 comment 'PANGEA asset chain port' |
|||
sudo ufw allow 15105 comment 'JUMBLR asset chain port' |
|||
sudo ufw allow 14249 comment 'BET asset chain port' |
|||
sudo ufw allow 8515 comment 'CRYPTO asset chain port' |
|||
sudo ufw allow 14430 comment 'HODL asset chain port' |
|||
#sudo ufw allow 10113 comment 'SHARK asset chain port' |
|||
sudo ufw allow 11963 comment 'BOTS asset chain port' |
|||
sudo ufw allow 12385 comment 'MGW asset chain port' |
|||
sudo ufw allow 8654 comment 'MVP asset chain port' |
|||
sudo ufw allow 12166 comment 'WLC asset chain port' |
|||
sudo ufw allow 8298 comment 'KV asset chain port' |
|||
sudo ufw allow 11115 comment 'CEAL asset chain port' |
|||
sudo ufw allow 9454 comment 'MESH asset chain port' |
|||
sudo ufw allow 14336 comment 'MNZ asset chain port' |
|||
sudo ufw allow 14275 comment 'COQUI' |
|||
sudo ufw allow 8845 comment 'MSHARK' |
|||
sudo ufw allow 12926 comment 'AXO' |
|||
sudo ufw allow 8799 comment 'BTCH' |
|||
sudo ufw allow 10270 comment 'ETOMIC' |
|||
sudo ufw allow 15487 comment 'VOTE2018' |
|||
sudo ufw allow 8426 comment 'NINJA' |
|||
sudo ufw allow 8922 comment 'BEER' |
|||
sudo ufw allow 11607 comment 'PIZZA' |
|||
sudo ufw enable |
|||
# check the status again |
|||
sudo ufw status |
@ -0,0 +1,21 @@ |
|||
#https://github.com/KomodoPlatform/KomodoPlatform/wiki/BarterDEX-Network-Optimisations-&-Handle-BarterDEX-on-Very-FAST-Computer |
|||
#https://wwwx.cs.unc.edu/~sparkst/howto/network_tuning.php#Steps |
|||
#https://wiki.mikejung.biz/Sysctl_tweaks |
|||
|
|||
net.core.rmem_max = 212992 |
|||
net.core.wmem_max = 212992 |
|||
net.core.netdev_max_backlog = 1000 |
|||
net.core.somaxconn = 128 |
|||
net.ipv4.tcp_rmem = 4096 87380 6291456 |
|||
net.ipv4.tcp_wmem = 4096 16384 4194304 |
|||
net.ipv4.tcp_no_metrics_save = 0 |
|||
net.ipv4.tcp_tw_reuse = 0 |
|||
net.ipv4.tcp_max_orphans = 262144 |
|||
net.ipv4.tcp_max_syn_backlog = 2048 |
|||
net.ipv4.tcp_fin_timeout = 60 |
|||
net.ipv4.tcp_keepalive_time = 7200 |
|||
net.ipv4.tcp_keepalive_intvl = 75 |
|||
net.ipv4.tcp_synack_retries = 5 |
|||
net.ipv4.tcp_syn_retries = 6 |
|||
net.ipv4.tcp_max_tw_buckets = 262144 |
|||
net.ipv4.ip_local_port_range = 32768 60999 |
@ -0,0 +1,2 @@ |
|||
cd ~/SuperNET/iguana |
|||
git checkout beta && git pull && ./m_notary && cd ~/komodo/src && ./dpowassets |
@ -0,0 +1,3 @@ |
|||
cd ~/SuperNET/iguana |
|||
./m_notary_testnet |
|||
|
@ -0,0 +1,5 @@ |
|||
#!/bin/bash |
|||
cd ~/komodo |
|||
git pull --rebase |
|||
make clean |
|||
./zcutil/build.sh -j$(nproc) |
@ -0,0 +1,4 @@ |
|||
#!/bin/bash |
|||
chipsd & |
|||
cd komodo |
|||
./src/komodod -gen -genproclimit=2 -notary -pubkey="02b207a2be16f205184664c88c8dc842f128a79a3a6c03741e5506cb480cb48268" & |
@ -0,0 +1,3 @@ |
|||
#!/bin/bash |
|||
cd komodo/src |
|||
./assetchains |
@ -0,0 +1,75 @@ |
|||
#!/bin/bash |
|||
IFS= |
|||
source coinlist |
|||
#Change to sleepytime=false if you don't want it to loop |
|||
sleepytime=600 |
|||
utxoamt=0.00010000 |
|||
ntrzdamt=-0.00083600 |
|||
|
|||
btcntrzaddr=1P3rU1Nk1pmc2BiWC8dEy9bZa1ZbMp5jfg |
|||
kmdntrzaddr=RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA |
|||
|
|||
#How many transactions back to scan for notarizations |
|||
txscanamount=77777 |
|||
|
|||
format="%-8s %7s %6s %7s %12s\n" |
|||
|
|||
outputstats () |
|||
{ |
|||
count=0 |
|||
now=$(date +"%Y-%m-%d %T%z") |
|||
|
|||
printf "\n\n%-8s %7s %6s %7s %12s\n" "-ASSET-" "-NTRZd-" "-UTXO-" "-BLOX-" "-BALANCE-"; |
|||
|
|||
printf "%-8s %7s %6s %7s %12s\n" "BTC" \ |
|||
"$(bitcoin-cli listtransactions "" $txscanamount | grep $btcntrzaddr | wc -l)" \ |
|||
"$(bitcoin-cli listunspent | grep $utxoamt | wc -l)" \ |
|||
"$(bitcoin-cli getblockchaininfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" \ |
|||
"$(bitcoin-cli getbalance)" |
|||
|
|||
kmdinfo=$(komodo-cli getinfo) |
|||
printf "$format" "KMD" \ |
|||
"$(komodo-cli listtransactions "" $txscanamount | grep $kmdntrzaddr | wc -l)" \ |
|||
"$(komodo-cli listunspent | grep $utxoamt | wc -l)" \ |
|||
"$(echo $kmdinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" \ |
|||
"$(echo $kmdinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')" \ |
|||
|
|||
chipsinfo=$(chips-cli getinfo) |
|||
printf "$format" "CHIPS" \ |
|||
"$(chips-cli listtransactions "" $txscanamount | grep $kmdntrzaddr | wc -l)" \ |
|||
"$(chips-cli listunspent | grep $utxoamt | wc -l)" \ |
|||
"$(echo $chipsinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" \ |
|||
"$(echo $chipsinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')" \ |
|||
|
|||
while [ "x${coinlist[count]}" != "x" ] |
|||
do |
|||
all=${coinlist[count]} |
|||
name=${all%% *} |
|||
#if [ "$name" != "" ] |
|||
if [ "$name" != "" ] && [ "$name" != "VOTE2018" ] |
|||
then |
|||
info=$(komodo-cli -ac_name=$name getinfo) |
|||
txinfo=$(komodo-cli -ac_name=$name listtransactions "" $txscanamount) |
|||
|
|||
printf "$format" "$name" \ |
|||
"$(echo $txinfo | grep -- $kmdntrzaddr | wc -l)" \ |
|||
"$(komodo-cli -ac_name=$name listunspent | grep $utxoamt | wc -l)" \ |
|||
"$(echo $info | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" \ |
|||
"$(echo $info | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')" |
|||
fi |
|||
count=$(( $count +1 )) |
|||
done |
|||
printf "$now"; |
|||
} |
|||
|
|||
if [ "$sleepytime" != "false" ] |
|||
then |
|||
while true |
|||
do |
|||
outputstats |
|||
sleep $sleepytime |
|||
done |
|||
else |
|||
outputstats |
|||
echo |
|||
fi |
Loading…
Reference in new issue