diff options
Diffstat (limited to 'script')
-rwxr-xr-x | script/mysociety-switch-to-shared | 1 | ||||
-rwxr-xr-x | script/rails-deploy-before-down | 25 | ||||
-rwxr-xr-x | script/site-specific-install.sh | 11 |
3 files changed, 8 insertions, 29 deletions
diff --git a/script/mysociety-switch-to-shared b/script/mysociety-switch-to-shared index f82e77706..801532e57 100755 --- a/script/mysociety-switch-to-shared +++ b/script/mysociety-switch-to-shared @@ -23,6 +23,7 @@ mkdir -p "$SHARED_DIR" for F in \ cache \ + log \ public/foi-live-creation.png \ public/foi-user-use.png \ config/aliases \ diff --git a/script/rails-deploy-before-down b/script/rails-deploy-before-down index 42284b00d..c44bfe552 100755 --- a/script/rails-deploy-before-down +++ b/script/rails-deploy-before-down @@ -32,31 +32,6 @@ else OPTION_STAGING_SITE=1 fi -# create initial log files -if [ -e $TOP_DIR/../logs ] -then - # mySociety servers have logs dir in level above - if ! [ -h log ] && [ -d log ] - then - # If log is a directory rather than a symlink, move that - # directory out of the way: - mv log log.original - fi - ln -sfn $TOP_DIR/../logs log -else - # otherwise just make the directory - if [ -h log ] - then - # remove any old-style symlink first - rm -f log - fi - mkdir -p log -fi - -cd log -touch development.log fastcgi.crash.log production.log test.log -cd .. - # Returns 0 if an element is present in a bash array, and 1 otherwise # Taken from: http://stackoverflow.com/a/8574392/223092 contains () { diff --git a/script/site-specific-install.sh b/script/site-specific-install.sh index fce230822..4c8c99aa2 100755 --- a/script/site-specific-install.sh +++ b/script/site-specific-install.sh @@ -134,10 +134,6 @@ su -l -c "$BIN_DIRECTORY/install-as-user '$UNIX_USER' '$HOST' '$DIRECTORY'" "$UN # no longer need the PostgreSQL user to be a superuser: echo "ALTER USER \"$UNIX_USER\" WITH NOSUPERUSER;" | su -l -c 'psql' postgres -if [ ! "$DEVELOPMENT_INSTALL" = true ]; then - install_sysvinit_script -fi - # Set up root's crontab: cd "$REPOSITORY" @@ -151,6 +147,13 @@ sed -r \ -i /etc/cron.d/alaveteli echo $DONE_MSG +if [ ! "$DEVELOPMENT_INSTALL" = true ]; then + echo -n "Creating /etc/init.d/$SITE... " + (su -l -c "cd '$REPOSITORY' && bundle exec rake config_files:convert_init_script DEPLOY_USER='$UNIX_USER' VHOST_DIR='$DIRECTORY' VCSPATH='$SITE' SITE='$SITE' SCRIPT_FILE=config/sysvinit-thin.ugly" "$UNIX_USER") > /etc/init.d/"$SITE" + chmod a+rx /etc/init.d/"$SITE" + echo $DONE_MSG +fi + echo -n "Creating /etc/init.d/foi-alert-tracks... " (su -l -c "cd '$REPOSITORY' && bundle exec rake config_files:convert_init_script DEPLOY_USER='$UNIX_USER' VHOST_DIR='$DIRECTORY' SCRIPT_FILE=config/alert-tracks-debian.ugly" "$UNIX_USER") > /etc/init.d/foi-alert-tracks chmod a+rx /etc/init.d/foi-alert-tracks |