onryo
2 years ago
2 changed files with 29 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||
#!/bin/bash |
|||
|
|||
DIRDIR="/var/www/explorer.hush.land/var/www/explorer.hush.land" |
|||
DIR="/var/www/explorer.hush.land" |
|||
|
|||
cd $DIR && ./update_explorer_data.sh |
|||
cd $DIR && ./update_api.sh |
|||
|
|||
# Anonset |
|||
cd $DIRDIR && anonset=$(curl -s 'https://explorer.hush.land/api/getchaintxstats.json' | jq -r '.shielded_pool_size') && sed -i "s|<span class='anonset'>.*</span>|<span class='anonset'> $anonset </span>|g" template.html |
|||
|
|||
perl $DIR/bin/update.pl > $DIRDIR/index-1.html |
|||
|
|||
cd $DIRDIR && cat index-1.html > index.html |
@ -0,0 +1,15 @@ |
|||
#!/bin/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 |
Loading…
Reference in new issue