X-Git-Url: https://code.citadel.org/?p=citadel-docker.git;a=blobdiff_plain;f=citadel-docker-startup.sh;fp=citadel-docker-startup.sh;h=b9558e6e8f391048fc0da20eee4301ff606b004e;hp=64d63871e0f4b385f6dc20fa0923558150a87a90;hb=ba96c571eb2061b2ebf3b9b64f66f66e0683f412;hpb=2bb55e4ad7fe19905142babb26f5dc76ae06354f diff --git a/citadel-docker-startup.sh b/citadel-docker-startup.sh index 64d6387..b9558e6 100755 --- a/citadel-docker-startup.sh +++ b/citadel-docker-startup.sh @@ -2,18 +2,17 @@ # This is the script that is run when the Citadel Docker Container starts up. +# Create directories within the volume, if they do not already exist. +mkdir -p /citadel-data 2>/dev/null +mkdir -p /citadel-data/data 2>/dev/null +mkdir -p /citadel-data/files 2>/dev/null +mkdir -p /citadel-data/keys 2>/dev/null -# Any of these can fail, since they may already exist -mkdir /citadel-data -mkdir -p /citadel-data/data -mkdir -p /citadel-data/files -mkdir -p /citadel-data/keys +# Create symlinks into the volume subdirectories, from where our programs expect them to be. +ln -sfv /citadel-data/data /usr/local/citadel/ +ln -sfv /citadel-data/files /usr/local/citadel/ +ln -sfv /citadel-data/keys /usr/local/citadel/ +ln -sfv /citadel-data/keys /usr/local/webcit/ -# Now create the links -ln -sfv /citadel-data/data /usr/local/citadel/data -ln -sfv /citadel-data/files /usr/local/citadel/files -ln -sfv /citadel-data/keys /usr/local/citadel/keys -ln -sfv /citadel-data/keys /usr/local/webcit/keys - -# supervisord will take it from here -exec supervisor +# supervisord will take it from here. +exec /usr/bin/supervisord -c /etc/supervisor.conf