diff --git a/bin/lamassu-nuke-db b/bin/lamassu-nuke-db new file mode 100755 index 00000000..413196cd --- /dev/null +++ b/bin/lamassu-nuke-db @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -e + +if [ "$(whoami)" != "root" ]; then + echo -e "This script has to be run as \033[1mroot\033[0m user" + exit 3 +fi + +read -p "This will DELETE ALL YOUR DATA! Sure? (y/n) " answer +case ${answer:0:1} in + y|Y ) + echo "Deleting database..." + su -l postgres <