Skip to content
Snippets Groups Projects
Commit ef43e903 authored by Igor Witz's avatar Igor Witz
Browse files

Update pica-etherpad/entrypoint.sh

parent 911462db
No related branches found
No related tags found
1 merge request!17Correction bugs etherpad
......@@ -39,40 +39,38 @@ if [ "$RESULT" != $ETHERPAD_DB_NAME ]; then
-e "create database ${ETHERPAD_DB_NAME}"
fi
if [ ! -f /opt/etherpad-lite/settings.json ]; then
cat <<- EOF > /opt/etherpad-lite/settings.json
{
"title": "${ETHERPAD_TITLE}",
"ip": "0.0.0.0",
"port" :${ETHERPAD_PORT},
"dbType" : "mysql",
"dbSettings" : {
"user" : "${ETHERPAD_DB_USER}",
"host" : "${MYSQL_PORT_3306_TCP_ADDR}",
"password": "${ETHERPAD_DB_PASSWORD}",
"database": "${ETHERPAD_DB_NAME}",
"charset" : "utf8mb4"
},
EOF
cat <<- EOF > /opt/etherpad-lite/settings.json
{
"title": "${ETHERPAD_TITLE}",
"ip": "0.0.0.0",
"port" :${ETHERPAD_PORT},
"dbType" : "mysql",
"dbSettings" : {
"user" : "${ETHERPAD_DB_USER}",
"host" : "${MYSQL_PORT_3306_TCP_ADDR}",
"password": "${ETHERPAD_DB_PASSWORD}",
"database": "${ETHERPAD_DB_NAME}",
"charset" : "utf8mb4"
},
EOF
if [ $ETHERPAD_ADMIN_PASSWORD ]; then
if [ $ETHERPAD_ADMIN_PASSWORD ]; then
: ${ETHERPAD_ADMIN_USER:=admin}
cat <<- EOF >> /opt/etherpad-lite/settings.json
"users": {
"${ETHERPAD_ADMIN_USER}": {
"password": "${ETHERPAD_ADMIN_PASSWORD}",
"is_admin": true
}
},
EOF
fi
: ${ETHERPAD_ADMIN_USER:=admin}
cat <<- EOF >> /opt/etherpad-lite/settings.json
}
"users": {
"${ETHERPAD_ADMIN_USER}": {
"password": "${ETHERPAD_ADMIN_PASSWORD}",
"is_admin": true
}
},
EOF
fi
cat <<- EOF >> /opt/etherpad-lite/settings.json
}
EOF
exec "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment