Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

start openerp server with /etc/init.d/ command

By
daouda
on 2/28/13, 3:06 PM 10,363 views

Hi Guys, I have my Openerp deployed on a distant server and i would like to start it using the /etc/init.d/ command, or execute a scripte in each starting of the server. Thanks for helping me

Did you use a pre-built RPM or DEB package from nightly.openerp.com? What OpenERP version are you talking about? When installing with those packages an init-script should have been installed automatically. When you tell me the name of the linux distribution you are using I might post a working init-script for you.

Georg Bretschneider
on 2/28/13, 3:32 PM

i'am using the 7 version. I am using Ubuntu 12.04, and my OpenERP have the web and server addons separated.

daouda
on 2/28/13, 3:50 PM

Thanks but the problème i have is this error "Failed to load server-wi$ The web module is provided by the addons found in the openerp-web project. Maybe you forgot to add those addons in your addons_path configuration." I do think the web addons is not loaded

daouda
on 2/28/13, 6:28 PM

...Well, a comment on the right answer, or at least tell to who you are speaking :)

Camptocamp SA
on 3/1/13, 12:05 PM
2

Yannick Vaucher

--Yannick Vaucher--
1699
| 5 7 9
Lausanne, Switzerland
--Yannick Vaucher--
Yannick Vaucher
On 2/28/13, 3:43 PM

Using the lp:anybox.recipe.openerp to deploy our openerp instances, we firstly started to use a daemon launcher before we droped it to use supervisor in our buildout recipe. So at that time, I created a merge proposal to add an init.d launcher on anybox recipe.

Here to start with something, you can find 2 templates used to generate the init.d file:

It should be easy for you to replace the variables to have a static daemon launcher.

Something like:

PATH=/sbin:/bin:/usr/sbin:/usr/bin
PYTPATH= /usr/bin/python
DAEMON= <project_path>/server/openerp-server
NAME=openerp-server
PID=<path_to_stock_pid_file>/run/<my_openerp>.pid
DESC=openerp-server-<project_name>
CONFIG= <config_path>/instance.ini
LOGFILE=<log_file_path>/log/server.log
USER=<my_user>

Just a little comment about gunicorn. It is only useful for version v6.1. In v7.0 you can use he built-in multicorn launched by default.

Camptocamp SA
on 3/8/13, 8:53 AM
2

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 3/1/13, 10:04 PM

Hi,

"Failed to load server-wi$ The web module is provided by the addons found in the openerp-web project.

Maybe you forgot to add web addons in your addons_path in your openerp-server.conf file.

effectively your web addons are not loaded.

I think you used bazaar to download branch launchpad server addons and web, in this case, in your server config file, in options add line option in not yet done addons_path and add path to your web/addons and restart openerrp server.

example : addons_path = absolute_path/addons,absolute_path/web/addons Hope this will help.

Bye

1
Peter Seng
On 2/28/13, 10:31 PM

Copy OpenERP configuration file to /etc

sudo cp /opt/openerp/v7/server/install/openerp-server.conf  /etc/openerp-server.conf

Change the file permissions and file ownership to the openerp user.

sudo chown openerp: /etc/openerp-server.conf

sudo chmod 640 /etc/openerp-server.conf

You can download this edited copy with the following command

sudo wget http://www.altinisik.net/openerp/openerp-server -O /etc/init.d/openerp-server

edit it.

vi /etc/init.d/openerp-server

And we just need to change the location of the daemon.

Make the init script executable.

sudo chmod +x /etc/init.d/openerp-server

have a test

sudo /etc/init.d/openerp-server stop

sudo /etc/init.d/openerp-server start

do not forget to add the addons_path in openerp-server.conf

Datenpol gmbh, tlauber
on 3/4/13, 7:59 AM

@Peter Seng's , to be very complete, where is the command update-rc.d for boot sequencing? Bye

Cyril Gaspard (GEM)
on 3/8/13, 4:48 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 2/28/13, 3:06 PM
Seen: 10363 times
Last updated: 1/27/16, 1:35 AM