-
-
Notifications
You must be signed in to change notification settings - Fork 532
/
teampass-docker-start.sh
executable file
·39 lines (32 loc) · 897 Bytes
/
teampass-docker-start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
if [ ! -d ${VOL}/.git ];
then
echo "Initial setup..."
if [ -z ${GIT_TAG} ]; then
#git clone $REPO_URL ${VOL} # Errors out due to directory not being empty
git init
git remote add origin $REPO_URL
git pull
git checkout master -f
else
#git clone -b $GIT_TAG $REPO_URL ${VOL}
git init
git remote add origin $REPO_URL
git pull
git checkout $GIT_TAG -f
fi
mkdir ${VOL}/sk
mkdir ${VOL}/includes/libraries/csrfp/log
chown -Rf nginx:nginx ${VOL}
fi
if [ -f ${VOL}/includes/config/settings.php ] ;
then
echo "Teampass is ready."
rm -rf ${VOL}/install
else
echo "Teampass is not configured yet. Open it in a web browser to run the install process."
echo "Use ${VOL}/sk for the absolute path of your saltkey."
echo "When setup is complete, restart this image to remove the install directory."
fi
# Pass off to the image's script
exec /start.sh