Skip to content

Commit

Permalink
Escaping bash variable for sed.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Huerta committed Mar 29, 2016
1 parent 84caf77 commit 52d1b33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ ONION_ADDRESS=`cat /var/lib/tor/hidden_service/hostname`
echo 'Setting up the web server NGINX to use Tor onion service...'
mv /etc/nginx/sites-available/ghost /etc/nginx/sites-available/ghost.orig
cp blooming-onion/config/nginx/ghost /etc/nginx/sites-available/.
sed -i "s/ONION_PLACEHOLDER/$ONION_ADDRESS/g" /etc/nginx/sites-available/ghost
sed -i 's/ONION_PLACEHOLDER/'$ONION_ADDRESS'/g' /etc/nginx/sites-available/ghost

echo 'Updating Ghost config to use .onion address...'
mv /var/www/ghost/config.js /var/www/ghost/config.js.orig
cp blooming-onion/config/ghost/config.js /var/www/ghost/.
sed -i "s/ONION_PLACEHOLDER/$ONION_ADDRESS/g" /var/www/ghost/config.js
sed -i 's/ONION_PLACEHOLDER/'$ONION_ADDRESS'/g' /var/www/ghost/config.js

echo 'Restarting NGINX...'
service nginx reload

echo 'Congrats! You now have your very own Tor onion service.'
echo "Enter this address into the Tor browser: $ONION_ADDRESS"
echo 'Enter this address into the Tor browser: '$ONION_ADDRESS

0 comments on commit 52d1b33

Please sign in to comment.