be1205d90a
-Added a new "Masternodes" page which displays the current list of masternodes on the network -/api/getmasternodelist is no longer publicly accessible and has been replaced by /ext/getmasternodelist which returns the masternode list from local collection instead of directly from wallet -Added new masternode sync options to sync.js and sync.sh -Added new masternodes_last_updated field to the Stats collection -Updated delete_database.sh and restore_backup.sh to include support for the new masternodes collection -Network header menu icon changed to allow the new Masternodes menu item to use the old network icon
49 lines
1.3 KiB
Bash
Executable File
49 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Find the absolute path to this script file
|
|
SCRIPT_PATH=`dirname "$0"`
|
|
SCRIPT_PATH=`( cd "$SCRIPT_PATH" && pwd )`
|
|
# Remove temp file if it exists from last time
|
|
if [ -f "${SCRIPT_PATH}/del.tmp" ]; then
|
|
rm -f "${SCRIPT_PATH}/del.tmp"
|
|
fi
|
|
# Prompt for deleting database
|
|
echo "You are about to delete the entire eIquidus database."
|
|
echo "Are you sure you want to do this? [y/n]: ";
|
|
read -p "" DELETE_ANSWER
|
|
# Determine if the database should be deleted
|
|
case "$DELETE_ANSWER" in
|
|
y|Y|yes|Yes|YES) ;;
|
|
*) echo "Process aborted. Nothing was deleted." && exit ;;
|
|
esac
|
|
# Erase entire database
|
|
sudo touch "${SCRIPT_PATH}/del.tmp" && mongo <<EOF
|
|
use explorerdb
|
|
db.addresses.remove({})
|
|
db.addresses.drop()
|
|
db.addresstxes.remove({})
|
|
db.addresstxes.drop()
|
|
db.coinstats.remove({})
|
|
db.coinstats.drop()
|
|
db.heavies.remove({})
|
|
db.heavies.drop()
|
|
db.markets.remove({})
|
|
db.markets.drop()
|
|
db.masternodes.remove({})
|
|
db.masternodes.drop()
|
|
db.peers.remove({})
|
|
db.peers.drop()
|
|
db.richlists.remove({})
|
|
db.richlists.drop()
|
|
db.txes.remove({})
|
|
db.txes.drop()
|
|
exit
|
|
EOF
|
|
# Check if the temp file exists to determine if the delete was successful or not
|
|
if [ -f "${SCRIPT_PATH}/del.tmp" ]; then
|
|
rm -f "${SCRIPT_PATH}/del.tmp"
|
|
echo "Finished deleting database."
|
|
else
|
|
echo "Process aborted. Nothing was deleted."
|
|
fi
|