#!/usr/bin/env 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|.*| $anonset |g" template.html
perl $DIR/bin/update.pl > $DIRDIR/index-1.html
cd $DIRDIR && cat index-1.html > index.html