Odoo (OpenERP) start-stop-daemon script

29

You are trying to run openerp as root thats why it fails, change:

# Specify the user name (Default: openerp).
USER=root

by

# Specify the user name (Default: openerp).
USER=YOUR_USER_THAT_RUNS_ODOO
Share:
29

Related videos on Youtube

Hoang Le Viet
Author by

Hoang Le Viet

Updated on September 18, 2022

Comments

  • Hoang Le Viet
    Hoang Le Viet almost 2 years

    I don't want to automatically receive data from firebase on change but receive it only when pressing a button. Any ideas on how to adapt the code below?

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            name = (EditText) findViewById(R.id.editTextTextPersonName);
            butt = (Button) findViewById(R.id.button);
            viet = (TextView) findViewById(R.id.textView_viet);
            butt.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    String var = name.getText().toString();
                    getdataUser();
                }
            });
            }
        private void getdataUser(){
            data_user1.child(var).addValueEventListener(new ValueEventListener() {
                @Override
                public void onDataChange(@NonNull DataSnapshot data) {
                    String yy = data.getValue().toString();
                    viet.setText(yy)
                }
    
                @Override
                public void onCancelled(@NonNull DatabaseError error) {
    
                }
            });
        }
    

    Any ideas are appreciated!

    • Jos
      Jos almost 9 years
      The start-stop-daemon itself may have something to log. Edit your script and add something like >> /var/log/odoo.log after every start-stop-daemon command. Start and stop your process, and see if something shows up in the log.
    • Yuri Shtrikker
      Yuri Shtrikker almost 9 years
      I try --logfile ${LFILE} (don't work) and >> ${LFILE} (log is empty) To log file I give chmod 777, and it's don't help
    • Jos
      Jos almost 9 years
      What if you issue the start-stop-daemon command yourself?
    • Yuri Shtrikker
      Yuri Shtrikker almost 9 years
      if I try to stop it, I see msg: Stopping openerp-server: start-stop-daemon: warning: failed to kill 1204: No such process openerp-server.
    • Jos
      Jos almost 9 years
      Can you get the server running with sudo /opt/odoo/openerp-server -c /etc/openerp-server.conf &? Because that is basically all the start-stop-daemon command does when you start the service.
    • Yuri Shtrikker
      Yuri Shtrikker almost 9 years
      yea, i can manual start, and all be ok if I do it. process created and log writing. if I need stop him, I use kill command. But if I start from sh (example: sudo su root; sh /etc/init.d/odoo-test start) pid file is creating, but odoo don't work, and i can't stop from sh /etc/init.d/odoo-test stop