[DRE-commits] [diaspora-installer] 28/55: setup secret token

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Dec 8 12:41:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository diaspora-installer.

commit 25499850c9c6ecc957de2c1f3ddbb8e58d642b50
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Tue Dec 2 21:04:55 2014 +0530

    setup secret token
---
 debian/postinst | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/debian/postinst b/debian/postinst
index 666e2ef..3848011 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -79,6 +79,11 @@ case "$1" in
 	sudo -u diaspora -E bundle exec rake db:create db:schema:load
 	echo "Precompiling assets..."
 	sudo -u diaspora -E bundle exec rake assets:precompile
+	echo "Setting up secret_token..."
+	if ! grep config.secret_token
+		then 
+		echo Diaspora::Application.config.secret_token = \'$(sudo -u diaspora -E bundle exec rake secret)\' >> ${diaspora_home}/config/initializers/secret_token.rb
+	fi
 	echo "Starting diaspora service..."
 	sudo -u diaspora -E -i nohup ./script/server &
 	echo "Copy $SERVERNAME-bundle.pem and $SERVERNAME.key to /etc/diaspora/ssl"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora-installer.git



More information about the Pkg-ruby-extras-commits mailing list