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

This commit is contained in:
Adrian Malacoda 2014-11-24 02:00:05 -06:00
parent 27e81b45eb
commit 4ae4e35115

View File

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
if [[ ! -d /var/lib/mediawiki/skins ]]; then if [[ ! -h /app/skins ]]; then
mv /app/images /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/images /app/images
mv /app/skins /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/skins /app/skins mv /app/skins /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/skins /app/skins
fi fi
if [[ ! -h /app/images ]]; then
mv /app/images /var/lib/mediawiki/ && ln -s /var/lib/mediawiki/images /app/images
fi