|
@ -27,6 +27,8 @@ KIMAI_DB_NAME="" |
|
|
KIMAI_DB_USER="" |
|
|
KIMAI_DB_USER="" |
|
|
KIMAI_DB_PASSWORD="" |
|
|
KIMAI_DB_PASSWORD="" |
|
|
|
|
|
|
|
|
|
|
|
DISABLE_REGISTRATION="" |
|
|
|
|
|
|
|
|
if [ -f ".env" ]; then |
|
|
if [ -f ".env" ]; then |
|
|
CONFIG_EXISTS="true" |
|
|
CONFIG_EXISTS="true" |
|
|
read -p "Config file '.env' already exists! Would you like to use this? (y/n)" KEEP_CONFIG |
|
|
read -p "Config file '.env' already exists! Would you like to use this? (y/n)" KEEP_CONFIG |
|
@ -63,6 +65,8 @@ else |
|
|
echo "Use existing config file '.env'!" |
|
|
echo "Use existing config file '.env'!" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
read -p "Would you like to disable user registration and password reset via mail? (y/n)" DISABLE_REGISTRATION |
|
|
|
|
|
|
|
|
read -p "Should the config file '.env' be deleted after creating the container? (y/n)" DELETE_CONFIG |
|
|
read -p "Should the config file '.env' be deleted after creating the container? (y/n)" DELETE_CONFIG |
|
|
|
|
|
|
|
|
docker-compose up -d |
|
|
docker-compose up -d |
|
@ -76,29 +80,31 @@ done |
|
|
|
|
|
|
|
|
echo -e "\nContainer is running!" |
|
|
echo -e "\nContainer is running!" |
|
|
|
|
|
|
|
|
echo "Create 'local.yaml' file and restart container." |
|
|
|
|
|
|
|
|
if [ $DISABLE_REGISTRATION == "y" ]; then |
|
|
|
|
|
echo "Create 'local.yaml' file and restart container." |
|
|
|
|
|
|
|
|
rm -f tmp |
|
|
|
|
|
touch tmp |
|
|
|
|
|
echo "kimai:" >> tmp |
|
|
|
|
|
echo " user:" >> tmp |
|
|
|
|
|
echo " registration: false" >> tmp |
|
|
|
|
|
echo " password_reset: false" >> tmp |
|
|
|
|
|
|
|
|
rm -f tmp |
|
|
|
|
|
touch tmp |
|
|
|
|
|
echo "kimai:" >> tmp |
|
|
|
|
|
echo " user:" >> tmp |
|
|
|
|
|
echo " registration: false" >> tmp |
|
|
|
|
|
echo " password_reset: false" >> tmp |
|
|
|
|
|
|
|
|
docker exec -i $KIMAI_CONTAINER_NAME dd of=/opt/kimai/config/packages/local.yaml < tmp >> /dev/null 2>&1 |
|
|
|
|
|
|
|
|
docker exec -i $KIMAI_CONTAINER_NAME dd of=/opt/kimai/config/packages/local.yaml < tmp >> /dev/null 2>&1 |
|
|
|
|
|
|
|
|
rm -f tmp |
|
|
|
|
|
|
|
|
rm -f tmp |
|
|
|
|
|
|
|
|
docker restart -t 0 $KIMAI_CONTAINER_NAME >> /dev/null |
|
|
|
|
|
|
|
|
docker restart -t 0 $KIMAI_CONTAINER_NAME >> /dev/null |
|
|
|
|
|
|
|
|
echo -n "Wait until container is running ..." |
|
|
|
|
|
|
|
|
echo -n "Wait until container is running ..." |
|
|
|
|
|
|
|
|
while [ "`docker inspect -f {{.State.Health.Status}} $KIMAI_CONTAINER_NAME`" != "healthy" ]; do |
|
|
|
|
|
echo -n "." |
|
|
|
|
|
sleep 1 |
|
|
|
|
|
done |
|
|
|
|
|
|
|
|
while [ "`docker inspect -f {{.State.Health.Status}} $KIMAI_CONTAINER_NAME`" != "healthy" ]; do |
|
|
|
|
|
echo -n "." |
|
|
|
|
|
sleep 1 |
|
|
|
|
|
done |
|
|
|
|
|
|
|
|
echo -e "\nContainer is running!" |
|
|
|
|
|
|
|
|
echo -e "\nContainer is running!" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
if [ $DELETE_CONFIG == "y" ]; then |
|
|
if [ $DELETE_CONFIG == "y" ]; then |
|
|
rm -f .env |
|
|
rm -f .env |
|
|