Build from the published sources, not from git
[citadel-docker.git] / citadel-docker-startup.sh
1 #!/bin/bash
2
3 # This is the script that is run when the Citadel Docker Container starts up.
4
5 # Create directories within the volume, if they do not already exist.
6 mkdir -p /citadel-data          2>/dev/null
7 mkdir -p /citadel-data/data     2>/dev/null
8 mkdir -p /citadel-data/files    2>/dev/null
9 mkdir -p /citadel-data/keys     2>/dev/null
10
11 # Create symlinks into the volume subdirectories, from where our programs expect them to be.
12 ln -sfv /citadel-data/data /usr/local/citadel/
13 ln -sfv /citadel-data/files /usr/local/citadel/
14 ln -sfv /citadel-data/keys /usr/local/citadel/
15 ln -sfv /citadel-data/keys /usr/local/webcit/
16
17 # supervisord will take it from here.
18 exec /usr/bin/supervisord -c /etc/supervisor.conf