[DRE-commits] r4522 - trunk/redmine/debian
Jérémy Lal
kapouer-guest at alioth.debian.org
Sun Jan 10 02:59:20 UTC 2010
Author: kapouer-guest
Date: 2010-01-10 02:59:20 +0000 (Sun, 10 Jan 2010)
New Revision: 4522
Modified:
trunk/redmine/debian/postinst
Log:
Generates session.yml only if absent.
Modified: trunk/redmine/debian/postinst
===================================================================
--- trunk/redmine/debian/postinst 2010-01-10 02:54:28 UTC (rev 4521)
+++ trunk/redmine/debian/postinst 2010-01-10 02:59:20 UTC (rev 4522)
@@ -197,13 +197,15 @@
cd /usr/share/redmine
# add secret key, set permissions, manage file with ucf
- rake -s generate_session_store YML_SESSION_FILENAME="session.yml.new" RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" || true
- chown -f root:www-data ${fRailsEtc}/session.yml.new
- chmod 640 ${fRailsEtc}/session.yml.new
- ucf --debconf-ok ${fRailsEtc}/session.yml.new ${fRailsEtc}/session.yml
- rm ${fRailsEtc}/session.yml.new
- # move old session_store.rb
- echo "A new secret session key has been generated in ${fRailsEtc}/session.yml"
+ if [ ! -f "${fRailsEtc}/session.yml" ]; then
+ rake -s generate_session_store YML_SESSION_FILENAME="session.yml.new" RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" || true
+ chown -f root:www-data ${fRailsEtc}/session.yml.new
+ chmod 640 ${fRailsEtc}/session.yml.new
+ ucf --debconf-ok ${fRailsEtc}/session.yml.new ${fRailsEtc}/session.yml
+ rm ${fRailsEtc}/session.yml.new
+ # move old session_store.rb
+ echo "A new secret session key has been generated in ${fRailsEtc}/session.yml"
+ fi
if [ -f config/initializers/session_store.rb ]; then
mv config/initializers/session_store.rb config/initializers/session_store.rb.dpkg-old
echo "The old secret session key can be found in
More information about the Pkg-ruby-extras-commits
mailing list