diff options
Diffstat (limited to 'script/rails-post-deploy')
-rwxr-xr-x | script/rails-post-deploy | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/script/rails-post-deploy b/script/rails-post-deploy index bf639855b..c09868347 100755 --- a/script/rails-post-deploy +++ b/script/rails-post-deploy @@ -35,8 +35,13 @@ fi if [ -e $TOP_DIR/../logs ] then # mySociety servers have logs dir in level above - rm -f log - ln -s $TOP_DIR/../logs log + 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 ] |