install : apt-get install supervisor
crete a xxxx.conf file at /etc/supervisor/conf.d
the content like this:
====
[program:app_name]
command= python odoo.py -c local.conf
directory=/home/jon/workspace/odoo9
user=jon
autorestart=true
=====
sudo supervisorctl reload # to reload the conf info
sudo supervisorctl start app_name # to start the [program:app_name]
如果OK, 测试 kill 掉odoo进程,发现会立即自动重启