Skip to content

Commit

Permalink
micro script to reset configs to their original version
Browse files Browse the repository at this point in the history
  • Loading branch information
corcra committed Mar 30, 2016
1 parent aa66814 commit c32cb79
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions restore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Blooming Onion (c) David Huerta, Stephanie Hyland. Distributed under the GPL v3 license. See LICENSE.txt for deets.

echo 'Restoring original configuration files!'

echo 'Restoring NGINX config...'
cp blooming-onion/config/nginx/ghost.orig /etc/nginx/sites-available/ghost
echo 'Restoring Ghost config...'
cp blooming-onion/config/ghost/config.js.orig /var/www/ghost/config.js
echo 'Restoring torrc...'
cp blooming-onion/config/tor/torrc.orig /etc/tor/torrc

echo 'Restarting services...'
service tor reload
service nginx reload

echo 'Confirming hidden service is gone...'
ONION_ADDRESS=`sudo cat /var/lib/tor/hidden_service/hostname`
if [ -n "$ONION_ADDRESS" ]
then
echo 'ERROR:' $ONION_ADDRESS 'still exists! :('
else
echo 'SUCCESS!'
fi

0 comments on commit c32cb79

Please sign in to comment.