Browse Source

stuff

pull/1/head
onryo 2 years ago
parent
commit
f59f5388d9
  1. 14
      update.sh
  2. 15
      var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh

14
update.sh

@ -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

15
var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh

@ -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…
Cancel
Save