Skip to content

Commit

Permalink
various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiBForgeFlow committed Feb 15, 2018
1 parent c5c50c1 commit fd82c44
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ odoo_config_limit_time_real_cron: -1 # >= 10.0
odoo_config_list_db: True
odoo_config_log_db: False
odoo_config_log_level: info
odoo_config_logfile: None
odoo_config_logfile: "/var/log/{{ odoo_user }}/{{ odoo_user }}.log"
odoo_config_logrotate: False
odoo_config_longpolling_port: 8072
odoo_config_osv_memory_age_limit: 1.0
Expand Down
4 changes: 4 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
tags:
- odoo_log

- name: Create odoo data dir directory
file: path={{ odoo_config_data_dir }} state=directory
owner={{ odoo_user }} group={{ odoo_user }} force=yes

- name: Project repository already cloned?
stat: path={{ odoo_repo_dest }}
register: project_path
Expand Down
3 changes: 2 additions & 1 deletion templates/odoo-pip.init
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ VIRTUALENV={{ odoo_pip_venv_path }}
DAEMON={{ odoo_pip_odoo_bin_path }}
NAME={{ odoo_service }}
DESC={{ odoo_service }}
CONFIG={{ odoo_config_file }}
LOGFILE={{ odoo_logdir }}/{{ odoo_service }}.log
PIDFILE=/var/run/${NAME}.pid
USER={{ odoo_user }}
Expand All @@ -40,7 +41,7 @@ function _start() {
# from the configuration file
# Odoo: https://github.com/odoo/odoo/pull/13685
# OCB: https://github.com/OCA/OCB/pull/553
start-stop-daemon --chdir=${WORKDIR} --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --logfile $LOGFILE{{ odoo_config_server_wide_modules not in [False, 'None', ''] and ' --load=%s' % odoo_config_server_wide_modules or '' }}
start-stop-daemon --chdir=${WORKDIR} --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON --config $CONFIG --logfile $LOGFILE{{ odoo_config_server_wide_modules not in [False, 'None', ''] and ' --load=%s' % odoo_config_server_wide_modules or '' }}
}

function _stop() {
Expand Down
2 changes: 1 addition & 1 deletion templates/odoo-pip.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=network.target
Type=simple
User={{ odoo_user }}
WorkingDirectory={{ odoo_workdir }}
ExecStart={{ odoo_pip_odoo_bin_path }}
ExecStart={{ odoo_pip_odoo_bin_path }} --config {{ odoo_config_file }}
{% for name, value in odoo_init_env.iteritems() %}
Environment={{ name }}={{ value }}
{% endfor %}
Expand Down

0 comments on commit fd82c44

Please sign in to comment.