From 1dddd4e913b21ea9ee3bf29b32916814be563fcf Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 6 May 2011 07:44:54 -0500 Subject: [PATCH] A completely evil environment destroying script. --- destroy_environment.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 destroy_environment.py diff --git a/destroy_environment.py b/destroy_environment.py new file mode 100755 index 00000000..bbdeffe9 --- /dev/null +++ b/destroy_environment.py @@ -0,0 +1,22 @@ +#!./bin/python + +import pymongo +import sys, os + +print "*** WARNING! ***" +print " Running this will destroy your mediagoblin database," +print " remove all your media files in user_dev/, etc." + +drop_it = raw_input( + 'Are you SURE you want to destroy your environment? (if so, type "yes")> ') + +if not drop_it == 'yes': + sys.exit(1) + +conn = pymongo.Connection() +conn.drop_database('mediagoblin') + +os.popen('rm -rf user_dev/media') +os.popen('rm -rf user_dev/beaker') + +print "removed all your stuff! okay, now re-run ./bin/buildout" -- 2.25.1