我真的不知道如何让主管使用环境变量。
以下是配置代码段。
[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路径从外壳开始,但不能从超级用户开始。在日志中,我收到一条错误消息,指出找不到导入。好吧,如果主管可以工作,那就可以解决。我什至在/ etc / environments中有路径?
主管为什么不工作?