Skip to content

Commit

Permalink
Merge pull request rubencabrera#40 from rubencabrera/12-database-escaped
Browse files Browse the repository at this point in the history
fix: escape db_filter env var
  • Loading branch information
rubencabrera authored Jan 22, 2020
2 parents ed5940d + 06374a7 commit e7ba997
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,8 @@ set -e
: ${DB_HOST:="db"}
: ${DB_FILTER:="^%d"}
# Estas no las estabamos metiendo:
##RUN echo 'dbfilter = '${DBFILTER:-"^%d"} >> /opt/config/odoo-server.conf; \
## echo 'logfile = '${LOGFILE:-"/var/log/odoo/odoo-server.log"} >> /opt/config/odoo-server.conf; \
## echo 'logrotate = '${LOGROTATE:-True} >> /opt/config/odoo-server.conf; \
## echo 'pg_path = '${PG_PATH:-None} >> /opt/config/odoo-server.conf; \


## echo 'logfile = '${LOGFILE:-"/var/log/odoo/odoo-server.log"} >> /opt/config/odoo-server.conf; \
## echo 'pg_path = '${PG_PATH:-None} >> /opt/config/odoo-server.conf; \

function write_conf() {
param="$1"
Expand All @@ -74,7 +70,7 @@ function write_conf() {
fi;
}


echo "ENTRYPOINT: Setting conf values"
write_conf "log_handler" $LOG_HANDLER
write_conf "log_level" $LOG_LEVEL
write_conf "log_db" ${LOG_DB}
Expand Down Expand Up @@ -127,8 +123,8 @@ 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}
# El case es de los argumentos pasados al entrypoint, no entra!
write_conf 'dbfilter' "${DB_FILTER}"

case "$1" in
-- | /opt/odoo/odoo-bin)
shift
Expand Down

0 comments on commit e7ba997

Please sign in to comment.