콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
8425 화면

Hello all,

I'm now able to run 2 differents instances of Odoo on the same computer. How could I change de process name? It is alway « python »...

Thanks for your idea.

아바타
취소
작성자 베스트 답변

Since I'm not able to rename process, I use this to kill particular process on my Ubuntu.

killall -v python -u odoo-test; (by user odoo-test)

 

 

아바타
취소

Its safer to do a ps aux and then do a sudo kill -9 procesNumber. Then you're sure you're only killing that one process you'd like.

베스트 답변

Linux/Unix way will be to use 

bash -c "exec -a MyUniqueProcessName <command> &"

however, THIS WILL NOT WORK due to the way odoo.py is executed. The shabang in the odoo.py (the #!/usr/bin/env python) is starting an instance of python which overrides the name of the process.

A workaround is to get  the PID of the process and store it in a file which you can later use to kill the process you want. Here is the most rudimentary example:

Crate file with name start_as.sh with following content:
#!/bin/bash
./odoo.py &
odoo_pid=$!
echo $odoo_pid >$1

Than you can use
./start_as.sh mynew.pid
kill `cat mynew.pid`

아바타
취소
작성자

He he!!! it is surely not the first time you work in Bash... Thanks!

Well, bash is not pretty, but it saves time :)

관련 게시물 답글 화면 활동
2
8월 25
2495
3
2월 25
3797
0
5월 24
46
1
4월 24
3512
4
9월 23
5054