最佳答案
我真的不知道如何让主管处理环境变量。
下面是一个配置片段。
[program:htNotificationService]
priority=2
#autostart=true
#autorestart=true
directory=/home/ubuntu/workspace/htFrontEnd/heythat/htsite
command = /usr/bin/python htNotificationService.py -service
stdout_logfile=/var/log/heythat/htNotificationService.log
redirect_stderr=true
environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat
stopsignal=QUIT
我试过以下方法:
environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat
environment=PYTHONPATH=$PYTHONPATH:/home/ubuntu/workspace/htFrontEnd/heythat
environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat,PYTHONPATH=$PYTHONPATH:/home/ubuntu/workspace/htFrontEnd/heythat
当我开始当主管的时候
htNotificationService: ERROR (abnormal termination)
我可以通过设置 python 路径从 shell 开始,但不能从 monitor 开始。在日志中,我得到一个错误,说明找不到导入。如果主管能工作的话,问题就解决了。我甚至有/etc/环境中的路径?
为什么主管不工作?