diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2013-09-11 17:37:54 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2013-09-13 15:09:02 +0100 |
commit | 0053c2a413843df34d5353c4757f556fb4f78dab (patch) | |
tree | 1fb0f52da50976070ccbe09a0e668f748de47051 /bin/site-specific-install.sh | |
parent | 94ac7786132a538a5742ba325eb7fe9eff89cfc9 (diff) |
Do fewer things for a dev installation.
If the development parameter is passed to the install-script, don't
install a crontab, don't set up nginx, don't force the repository
to a particular version, and don't set up an application server.
Also only create a general.yml file if one doesn't already exist,
and add some locales that the test suite assumes are present. And
run the db schema update script.
Diffstat (limited to 'bin/site-specific-install.sh')
-rw-r--r-- | bin/site-specific-install.sh | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/bin/site-specific-install.sh b/bin/site-specific-install.sh index d3da12104..5e59052a7 100644 --- a/bin/site-specific-install.sh +++ b/bin/site-specific-install.sh @@ -25,25 +25,33 @@ misuse() { [ -z "$HOST" ] && misuse HOST [ -z "$DISTRIBUTION" ] && misuse DISTRIBUTION [ -z "$VERSION" ] && misuse VERSION +[ -z "$DEVELOPMENT_INSTALL" ] && misuse DEVELOPMENT_INSTALL -install_nginx +add_locale cy_GB +add_locale nb_NO +add_locale de_CH install_postfix -# Check out the current released version -su -l -c "cd '$REPOSITORY' && git checkout '$VERSION'" "$UNIX_USER" +if [ ! "$DEVELOPMENT_INSTALL" = true ]; then + install_nginx + add_website_to_nginx + # Check out the current released version + su -l -c "cd '$REPOSITORY' && git checkout '$VERSION' && git submodule update" "$UNIX_USER" +fi install_website_packages su -l -c "touch '$DIRECTORY/admin-htpasswd'" "$UNIX_USER" -add_website_to_nginx - add_postgresql_user -su -l -c "$REPOSITORY/bin/install-as-user '$UNIX_USER' '$HOST' '$DIRECTORY'" "$UNIX_USER" +export DEVELOPMENT_INSTALL +su -c "$REPOSITORY/bin/install-as-user '$UNIX_USER' '$HOST' '$DIRECTORY'" "$UNIX_USER" -install_sysvinit_script +if [ ! "$DEVELOPMENT_INSTALL" = true ]; then + install_sysvinit_script +fi if [ $DEFAULT_SERVER = true ] && [ x != x$EC2_HOSTNAME ] then |