aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-05-28 16:04:26 +0100
committerGareth Rees <gareth@mysociety.org>2015-05-28 16:04:26 +0100
commit9c66a11f383f24b930e89126fd473c2e0480e577 (patch)
tree603446a4020b0f74b2f0204f9c917c56415e800b
parentb7a40c15d8c69a02edfc68e2681b3f68228ce8f0 (diff)
Set the STAGING_SITE config based on install type2392-install-production-daemon
DEVELOPMENT_INSTALL is exported by site-specific-install. Choose the correct STAGING_SITE setting based on this variable.
-rwxr-xr-xscript/install-as-user7
1 files changed, 7 insertions, 0 deletions
diff --git a/script/install-as-user b/script/install-as-user
index a6c267066..fd4c61969 100755
--- a/script/install-as-user
+++ b/script/install-as-user
@@ -87,6 +87,12 @@ RANDOM_EMAIL_SECRET=$(random_alphanumerics 32)
RANDOM_EMERGENCY_PASSWORD=$(random_alphanumerics 10)
RANDOM_COOKIE_SECRET=$(random_alphanumerics 100)
+if [ $DEVELOPMENT_INSTALL = true ]; then
+ STAGING_SITE="0"
+else
+ STAGING_SITE="1"
+fi
+
if ! [ -f config/general.yml ]
then
sed -r \
@@ -115,6 +121,7 @@ then
-e "s,^( *THEME_BRANCH:).*,\\1 'develop'," \
-e "s,^( *USE_MAILCATCHER_IN_DEVELOPMENT:).*,\\1 false," \
-e "s,^( *BUNDLE_PATH:).*,\\1 $HOME/bundle/," \
+ -e "s,^( *STAGING_SITE:).*,\\1 '$STAGING_SITE'," \
config/general.yml-example > config/general.yml
fi