Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 53 additions & 52 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,63 +66,64 @@ function write_conf() {
param="$1"
value="$2"
if ! grep -q -E "^\s*\b${param}\b\s*=" "$OPENERP_SERVER" ; then
echo "${param} not in conf, setting..."
echo "${param} = ${value}" >> $OPENERP_SERVER
fi;
}

echo "ENTRYPOINT: Setting conf values"
write_conf "log_handler" $LOG_HANDLER
write_conf "log_level" $LOG_LEVEL
write_conf "log_db" ${LOG_DB}
write_conf 'data_dir' ${DATA_DIR}
write_conf 'logrotate' ${LOGROTATE}
write_conf 'csv_internal_sep' ${CSV_INTERNAL_SEP}
write_conf 'admin_passwd' ${ADMIN_PASSWD}
write_conf 'db_port' ${DB_PORT}
write_conf 'db_user' ${DB_USER}
write_conf 'db_password' ${DB_PASSWORD}
write_conf 'db_template' ${DB_TEMPLATE}
write_conf 'db_name' ${DB_NAME}
write_conf 'db_maxconn' ${DB_MAXCONN}
write_conf 'db_maxconn' ${DB_MAXCONN}
write_conf 'debug_mode' ${DEBUG_MODE}
write_conf 'email_from' ${EMAIL_FROM}
write_conf 'limit_memory_hard' ${LIMIT_MEMORY_HARD}
write_conf 'limit_memory_soft' ${LIMIT_MEMORY_SOFT}
write_conf 'limit_request' ${LIMIT_REQUEST}
write_conf 'limit_time_cpu' ${LIMIT_TIME_CPU}
write_conf 'limit_time_real' ${LIMIT_TIME_REAL}
write_conf 'list_db' ${LIST_DB}
write_conf 'longpolling_port' ${LONGPOLLING_PORT}
write_conf 'max_cron_threads' ${MAX_CRON_THREADS}
write_conf 'osv_memory_age_limit' ${OSV_MEMORY_AGE_LIMIT}
write_conf 'osv_memory_count_limit' ${OSV_MEMORY_COUNT_LIMIT}
write_conf 'pidfile' ${PIDFILE}
write_conf 'proxy_mode' ${PROXY_MODE}
write_conf 'reportgz' ${REPORTGZ}
write_conf 'secure_cert_file' ${SECURE_CERT_FILE}
write_conf 'secure_pkey_file' ${SECURE_pkey_FILE}
write_conf 'server_wide_modules' ${SERVER_WIDE_MODULES}
write_conf 'smtp_password' ${SMTP_PASSWORD}
write_conf 'smtp_port' ${SMTP_PORT}
write_conf 'smtp_server' ${SMTP_SERVER}
write_conf 'smtp_ssl' ${SMTP_SSL}
write_conf 'smtp_user' ${SMTP_USER}
write_conf 'syslog' ${SYSLOG}
write_conf 'test_commit' ${TEST_COMMIT}
write_conf 'test_enable' ${TEST_ENABLE}
write_conf 'test_file' ${TEST_FILE}
write_conf 'test_report_directory' ${TEST_REPORT_DIRECTORY}
write_conf 'timezone' ${TIMEZONE}
write_conf 'translate_modules' ${TRANSLATE_MODULES}
write_conf 'unaccent' ${UNACCENT}
write_conf 'without_demo' ${WITHOUT_DEMO}
write_conf 'workers' ${WORKERS}
write_conf 'xmlrpc' ${XMLRPC}
write_conf 'xmlrpc_port' ${XMLRPC_PORT}
write_conf 'xmlrpcs' ${XMLRPCS}
write_conf 'xmlrpcs_port' ${XMLRPCS_PORT}
write_conf 'db_host' ${DB_HOST}
write_conf "log_handler" "${LOG_HANDLER}"
write_conf "log_level" "${LOG_LEVEL}"
write_conf "log_db" "${LOG_DB}"
write_conf 'data_dir' "${DATA_DIR}"
write_conf 'logrotate' "${LOGROTATE}"
write_conf 'csv_internal_sep' "${CSV_INTERNAL_SEP}"
write_conf 'admin_passwd' "${ADMIN_PASSWD}"
write_conf 'db_port' "${DB_PORT}"
write_conf 'db_user' "${DB_USER}"
write_conf 'db_password' "${DB_PASSWORD}"
write_conf 'db_template' "${DB_TEMPLATE}"
write_conf 'db_name' "${DB_NAME}"
write_conf 'db_maxconn' "${DB_MAXCONN}"
write_conf 'db_maxconn' "${DB_MAXCONN}"
write_conf 'debug_mode' "${DEBUG_MODE}"
write_conf 'email_from' "${EMAIL_FROM}"
write_conf 'limit_memory_hard' "${LIMIT_MEMORY_HARD}"
write_conf 'limit_memory_soft' "${LIMIT_MEMORY_SOFT}"
write_conf 'limit_request' "${LIMIT_REQUEST}"
write_conf 'limit_time_cpu' "${LIMIT_TIME_CPU}"
write_conf 'limit_time_real' "${LIMIT_TIME_REAL}"
write_conf 'list_db' "${LIST_DB}"
write_conf 'longpolling_port' "${LONGPOLLING_PORT}"
write_conf 'max_cron_threads' "${MAX_CRON_THREADS}"
write_conf 'osv_memory_age_limit' "${OSV_MEMORY_AGE_LIMIT}"
write_conf 'osv_memory_count_limit' "${OSV_MEMORY_COUNT_LIMIT}"
write_conf 'pidfile' "${PIDFILE}"
write_conf 'proxy_mode' "${PROXY_MODE}"
write_conf 'reportgz' "${REPORTGZ}"
write_conf 'secure_cert_file' "${SECURE_CERT_FILE}"
write_conf 'secure_pkey_file' "${SECURE_pkey_FILE}"
write_conf 'server_wide_modules' "${SERVER_WIDE_MODULES}"
write_conf 'smtp_password' "${SMTP_PASSWORD}"
write_conf 'smtp_port' "${SMTP_PORT}"
write_conf 'smtp_server' "${SMTP_SERVER}"
write_conf 'smtp_ssl' "${SMTP_SSL}"
write_conf 'smtp_user' "${SMTP_USER}"
write_conf 'syslog' "${SYSLOG}"
write_conf 'test_commit' "${TEST_COMMIT}"
write_conf 'test_enable' "${TEST_ENABLE}"
write_conf 'test_file' "${TEST_FILE}"
write_conf 'test_report_directory' "${TEST_REPORT_DIRECTORY}"
write_conf 'timezone' "${TIMEZONE}"
write_conf 'translate_modules' "${TRANSLATE_MODULES}"
write_conf 'unaccent' "${UNACCENT}"
write_conf 'without_demo' "${WITHOUT_DEMO}"
write_conf 'workers' "${WORKERS}"
write_conf 'xmlrpc' "${XMLRPC}"
write_conf 'xmlrpc_port' "${XMLRPC_PORT}"
write_conf 'xmlrpcs' "${XMLRPCS}"
write_conf 'xmlrpcs_port' "${XMLRPCS_PORT}"
write_conf 'db_host' "${DB_HOST}"
write_conf 'dbfilter' "${DB_FILTER}"

case "$1" in
Expand Down