Skip to content

Commit

Permalink
fixes to the pip install method.
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiBForgeFlow committed Feb 16, 2018
1 parent c5c50c1 commit e801b88
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
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 }} --logfile {{ odoo_logdir }}/{{ odoo_service}}.log --config {{ odoo_config_file }}
{% for name, value in odoo_init_env.iteritems() %}
Environment={{ name }}={{ value }}
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions templates/odoo-standard.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Type=simple
User={{ odoo_user }}
WorkingDirectory={{ odoo_workdir }}
{% if odoo_version | version_compare('10.0', '>=') %}
ExecStart={{ odoo_rootdir }}/odoo-bin --logfile {{ odoo_logdir }}/{{ odoo_service }}.log
ExecStart={{ odoo_rootdir }}/odoo-bin --logfile {{ odoo_logdir }}/{{ odoo_service }}.log --config {{ odoo_config_file }}
{% else %}
ExecStart={{ odoo_rootdir }}/odoo.py --logfile {{ odoo_logdir }}/{{ odoo_service }}.log
ExecStart={{ odoo_rootdir }}/odoo.py --logfile {{ odoo_logdir }}/{{ odoo_service}}.log --config {{ odoo_config_file }}
{% endif %}
{% for name, value in odoo_init_env.iteritems() %}
Environment={{ name }}={{ value }}
Expand Down

0 comments on commit e801b88

Please sign in to comment.