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:
parent
9a008bbd67
commit
5653605515
2 changed files with 22 additions and 3 deletions
14
conf/odoo.service.j2
Normal file
14
conf/odoo.service.j2
Normal 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
|
|
@ -8,11 +8,11 @@ function define_paths() {
|
||||||
# In odoo 10 some file change
|
# In odoo 10 some file change
|
||||||
if [ $(echo "$odoo_version >= 10" | bc) -ne 0 ]; then
|
if [ $(echo "$odoo_version >= 10" | bc) -ne 0 ]; then
|
||||||
export source_path=/usr/lib/python2.7/dist-packages/odoo/
|
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
|
bin_file=/usr/bin/odoo
|
||||||
else
|
else
|
||||||
export source_path=/usr/lib/python2.7/dist-packages/openerp/
|
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
|
bin_file=/usr/bin/openerp-server
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ function install_dependencies() {
|
||||||
if [ ! -f /etc/apt/sources.list.d/odoo.list ]; then
|
if [ ! -f /etc/apt/sources.list.d/odoo.list ]; then
|
||||||
# Install Odoo
|
# Install Odoo
|
||||||
# Prepare installation
|
# Prepare installation
|
||||||
ynh_package_install curl
|
ynh_package_install curl bc
|
||||||
|
|
||||||
# Install Odoo
|
# Install Odoo
|
||||||
curl -sS https://nightly.odoo.com/odoo.key | sudo apt-key add -
|
curl -sS https://nightly.odoo.com/odoo.key | sudo apt-key add -
|
||||||
|
@ -106,9 +106,14 @@ function add_services() {
|
||||||
yunohost service add postgresql
|
yunohost service add postgresql
|
||||||
fi
|
fi
|
||||||
if ! grep "^odoo:$" /etc/yunohost/services.yml; then
|
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 add odoo --log /var/log/odoo/odoo-server.log
|
||||||
yunohost service stop odoo
|
yunohost service stop odoo
|
||||||
yunohost service start odoo
|
yunohost service start odoo
|
||||||
|
yunohost service enable odoo
|
||||||
|
systemctl enable odoo
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue