From 4ae4e3511518cc768f3bc8740d341378e2f98b59 Mon Sep 17 00:00:00 2001 From: Adrian Malacoda Date: Mon, 24 Nov 2014 02:00:05 -0600 Subject: [PATCH] if we deploy a new image on top of an existing install then it will overwrite the symlinks going to the shared volume, so check if the file is a symlink and if not then create the link --- setup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 65a4db4..24c68a1 100644 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,9 @@ #!/bin/bash -if [[ ! -d /var/lib/mediawiki/skins ]]; then - mv /app/images /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/images /app/images +if [[ ! -h /app/skins ]]; then mv /app/skins /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/skins /app/skins fi + +if [[ ! -h /app/images ]]; then + mv /app/images /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/images /app/images +fi