1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/libreerp_ynh.git synced 2024-09-03 19:36:13 +02:00

[fix] Missing bc dependencies

This commit is contained in:
ljf 2018-05-21 10:51:03 +02:00
parent 9a008bbd67
commit 5653605515
2 changed files with 22 additions and 3 deletions

14
conf/odoo.service.j2 Normal file
View file

@ -0,0 +1,14 @@
[Unit]
Description=Odoo
After=network.target
[Service]
Type=simple
User=odoo
Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
ExecStart=/usr/bin/odoo.py --config {{ conf_file }} > /var/log/odoo/odoo-server.log 2>&1
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target

View file

@ -8,11 +8,11 @@ function define_paths() {
# In odoo 10 some file change
if [ $(echo "$odoo_version >= 10" | bc) -ne 0 ]; then
export source_path=/usr/lib/python2.7/dist-packages/odoo/
conf_file=/etc/odoo/odoo.conf
export conf_file=/etc/odoo/odoo.conf
bin_file=/usr/bin/odoo
else
export source_path=/usr/lib/python2.7/dist-packages/openerp/
conf_file=/etc/odoo/openerp-server.conf
export conf_file=/etc/odoo/openerp-server.conf
bin_file=/usr/bin/openerp-server
fi
}
@ -70,7 +70,7 @@ function install_dependencies() {
if [ ! -f /etc/apt/sources.list.d/odoo.list ]; then
# Install Odoo
# Prepare installation
ynh_package_install curl
ynh_package_install curl bc
# Install Odoo
curl -sS https://nightly.odoo.com/odoo.key | sudo apt-key add -
@ -106,9 +106,14 @@ function add_services() {
yunohost service add postgresql
fi
if ! grep "^odoo:$" /etc/yunohost/services.yml; then
ynh_configure odoo.service /etc/systemd/system/odoo.service
rm /etc/init.d/odoo
yunohost service add odoo --log /var/log/odoo/odoo-server.log
yunohost service stop odoo
yunohost service start odoo
yunohost service enable odoo
systemctl enable odoo
fi
}