diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/address/template.html b/address/template.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/address/template.html rename to address/template.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/addresses/template.html b/addresses/template.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/addresses/template.html rename to addresses/template.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/anonset.json b/api/anonset.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/anonset.json rename to api/anonset.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/coinsupply.json b/api/coinsupply.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/coinsupply.json rename to api/coinsupply.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/getblockchain.json b/api/getblockchain.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/getblockchain.json rename to api/getblockchain.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/getchaintips.json b/api/getchaintips.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/getchaintips.json rename to api/getchaintips.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/getchaintxstats.json b/api/getchaintxstats.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/getchaintxstats.json rename to api/getchaintxstats.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/getinfo.json b/api/getinfo.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/getinfo.json rename to api/getinfo.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/getmininginfo.json b/api/getmininginfo.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/getmininginfo.json rename to api/getmininginfo.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/gettxoutsetinfo.json b/api/gettxoutsetinfo.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/gettxoutsetinfo.json rename to api/gettxoutsetinfo.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/index.html b/api/index.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/index.html rename to api/index.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/snapshots/snapshot-old.json b/api/snapshots/snapshot-old.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/snapshots/snapshot-old.json rename to api/snapshots/snapshot-old.json diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/api/snapshots/snapshot.json b/api/snapshots/snapshot.json similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/api/snapshots/snapshot.json rename to api/snapshots/snapshot.json diff --git a/var/www/explorer.hush.land/bin/HOWTO b/bin/HOWTO similarity index 100% rename from var/www/explorer.hush.land/bin/HOWTO rename to bin/HOWTO diff --git a/var/www/explorer.hush.land/bin/Makefile b/bin/Makefile similarity index 100% rename from var/www/explorer.hush.land/bin/Makefile rename to bin/Makefile diff --git a/var/www/explorer.hush.land/bin/backup/update_blocks_redis.pl b/bin/backup/update_blocks_redis.pl similarity index 100% rename from var/www/explorer.hush.land/bin/backup/update_blocks_redis.pl rename to bin/backup/update_blocks_redis.pl diff --git a/var/www/explorer.hush.land/bin/balances.pl b/bin/balances.pl similarity index 100% rename from var/www/explorer.hush.land/bin/balances.pl rename to bin/balances.pl diff --git a/var/www/explorer.hush.land/bin/block-340k.json b/bin/block-340k.json similarity index 100% rename from var/www/explorer.hush.land/bin/block-340k.json rename to bin/block-340k.json diff --git a/var/www/explorer.hush.land/bin/example.html b/bin/example.html similarity index 100% rename from var/www/explorer.hush.land/bin/example.html rename to bin/example.html diff --git a/var/www/explorer.hush.land/bin/nope/README b/bin/nope/README similarity index 100% rename from var/www/explorer.hush.land/bin/nope/README rename to bin/nope/README diff --git a/var/www/explorer.hush.land/bin/nope/update_addresses.pl b/bin/nope/update_addresses.pl similarity index 100% rename from var/www/explorer.hush.land/bin/nope/update_addresses.pl rename to bin/nope/update_addresses.pl diff --git a/var/www/explorer.hush.land/bin/update.pl b/bin/update.pl similarity index 100% rename from var/www/explorer.hush.land/bin/update.pl rename to bin/update.pl diff --git a/var/www/explorer.hush.land/bin/update_blocks_redis.pl b/bin/update_blocks_redis.pl similarity index 100% rename from var/www/explorer.hush.land/bin/update_blocks_redis.pl rename to bin/update_blocks_redis.pl diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/block/template.html b/block/template.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/block/template.html rename to block/template.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/blocks/template.html b/blocks/template.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/blocks/template.html rename to blocks/template.html diff --git a/var/www/explorer.hush.land/crons/README b/crons/README similarity index 100% rename from var/www/explorer.hush.land/crons/README rename to crons/README diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/index-1.html b/index-1.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/index-1.html rename to index-1.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/index-new.html b/index-new.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/index-new.html rename to index-new.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/index-prev.html b/index-prev.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/index-prev.html rename to index-prev.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/index.html b/index.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/index.html rename to index.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/template.html b/template.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/template.html rename to template.html diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/tx/template.html b/tx/template.html similarity index 100% rename from var/www/explorer.hush.land/var/www/explorer.hush.land/tx/template.html rename to tx/template.html diff --git a/update.sh b/update.sh index 83bbe59..64dfe51 100644 --- a/update.sh +++ b/update.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash -DOMAIN=$(SIONA_DOMAIN) -DIR="/var/www/$DOMAIN" -DIRDIR="$DIR$DIR" +set -e -cd $DIR && ./update_explorer_data.sh -cd $DIR && ./update_api.sh +DOMAIN=explorer.hush.land/var/www/explorer.hush.land +DIR=/var/www -# Anonset -cd $DIRDIR && anonset=$(curl -s "https://$DOMAIN/api/getchaintxstats.json" | jq -r '.shielded_pool_size') && sed -i "s|.*| $anonset |g" template.html +echo $$ >> $DIR/$DOMAIN/PID -perl $DIR/bin/update.pl > $DIRDIR/index-1.html - -cd $DIRDIR && cat index-1.html > index.html +# make a backup so we can diff them +cp $DIR/$DOMAIN/{index,index-prev}.html +# let index.html settle +sleep 2 +perl /var/www/explorer.hush.land/bin/update.pl /var/www/explorer.hush.land/api &> $DIR/$DOMAIN/index-new.html +cp $DIR/$DOMAIN/index-new.html $DIR/$DOMAIN/index.html diff --git a/var/www/explorer.hush.land/update_api.sh b/update_api.sh similarity index 100% rename from var/www/explorer.hush.land/update_api.sh rename to update_api.sh diff --git a/var/www/explorer.hush.land/update_explorer_data.sh b/update_explorer_data.sh similarity index 100% rename from var/www/explorer.hush.land/update_explorer_data.sh rename to update_explorer_data.sh diff --git a/var/www/explorer.hush.land/PID b/var/www/explorer.hush.land/PID deleted file mode 100644 index e69de29..0000000 diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/PID b/var/www/explorer.hush.land/var/www/explorer.hush.land/PID deleted file mode 100644 index 635f318..0000000 --- a/var/www/explorer.hush.land/var/www/explorer.hush.land/PID +++ /dev/null @@ -1,12 +0,0 @@ -226212 -226355 -226361 -226664 -227090 -227309 -227738 -227933 -228039 -228062 -228077 -228090 diff --git a/var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh b/var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh deleted file mode 100644 index 64dfe51..0000000 --- a/var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DOMAIN=explorer.hush.land/var/www/explorer.hush.land -DIR=/var/www - -echo $$ >> $DIR/$DOMAIN/PID - -# make a backup so we can diff them -cp $DIR/$DOMAIN/{index,index-prev}.html -# let index.html settle -sleep 2 -perl /var/www/explorer.hush.land/bin/update.pl /var/www/explorer.hush.land/api &> $DIR/$DOMAIN/index-new.html -cp $DIR/$DOMAIN/index-new.html $DIR/$DOMAIN/index.html