结论:

The source command is only available in bash, and the supervisor command is run by sh. I would recommend using a script to perform your commands

 

代码示例:

[program:alarm_handler]
command = bash /opt/disk2/var/www/maliksi/file_protect/management/commands/alarm_handler_init.sh
# > /tmp/alarm_handler.log
process_name = %(program_name)s
stopsignal = QUIT
autostart = true
# startsecs =
# startretries =
autorestart = true
# exitcodes = ,,
stdout_logfile_maxbytes = 10MB
stdout_logfile_backups =
stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
# redirect_stderr = true

启动脚本:

#!/bin/bash

source /opt/ENV/ubuntu1227/bin/activate
exec /opt/ENV/ubuntu1227/bin/python /opt/disk2/var/www/maliksi/manage.py alarm_handler

It Works !

参考资料:

http://serverfault.com/questions/390531/running-django-custom-management-commands-with-supervisord

https://web.archive.org/web/20130526045634/http://sjsnyder.com/managing-virtualenv-apps-with-supervisor

【Supervisor】使用 Supervisor source command not found 如何解决的更多相关文章

  1. source command not found in sh shell解决办法

    在Ubuntu系统中执行脚本的时候突然出现错误"source command not found in sh shell" 这个其实在Ubuntu 当中 执行脚本默认的使用的是da ...

  2. learning uboot source command

    reference: http://www.denx.de/wiki/DULG/UBootCmdGroupExec => help source source - run script from ...

  3. Ubuntu解决sudo: source: command not found错误

    Ubuntu Server上执行以下命令,可以看到默认打开的文件数限制为1024个. $ ulimit -n 1024 编辑/etc/profile配置文件,在最后添加一行: ulimit -SHn ...

  4. zsh: command not found: pip 解决方法

    出现zsh: command not found: xxx解决方法: 把 bash shell 中.bash_profile 全部环境变量加入zsh shell里就好 step1: Term执行 op ...

  5. Centos命令行报bash:.....:command not found的解决办法

    命令行报bash:.....:command not found的解决办法(几乎所有命令)   命令行输入命令执行后报“bash:....:command not found”这是由于系统PATH设置 ...

  6. mysql导入导出sql文件,source导入速度慢的解决办法

    1.导出整个数据库mysqldump -u 用户名 -p 数据库名 > 导出的文件名mysqldump -u dbuser -p dbname > dbname.sql2.导出一个表mys ...

  7. 升级时针对Source oracle home 不存在解决办法

    针对于oracle升级从11.2.0.4升级至12.1.0.1,遇到的问题解决. 运行/oracle/app/product/12.1.0.1/dbhome_1/bin/dbua 后 在选择数据库ho ...

  8. django-admin:command not found的解决办法

    django-admin:command not found的解决办法 找到django-admin的路径 绝对路径  然后用命令行运行 python3 /usr/local/python3/lib/ ...

  9. nslookup:command not found的解决办法

    nslookup:command not found的解决办法 通过nslookup查看DNS记录,在这里遇到了一个小插曲,nslookup:command not found(未找到命令),是因为新 ...

随机推荐

  1. Struts2 中Parameters是如何获取值的

    刚刚学习struts2的知识,在练习struts2的默认语言OGNL过程中,对于<p>parameters:<s:property value="#parameters.u ...

  2. 创建守护进程步骤与setsid() -- linux deamon进程

    原创:http://www.cnblogs.com/mickole/p/3188321.html 一,守护进程概述 Linux Daemon(守护进程)是运行在后台的一种特殊进程.它独立于控制终端并且 ...

  3. javascript模块简单写法

    写法1: (function (wd, doc) { var mw = {}; mw.noConflict = noConflict; var _$ = wd.$; wd.$ = mw; functi ...

  4. Web Site 开发学习

    http://web-source.net/web_design_languages.htm#.Vw4uaeRJmt9 http://www.make-a-web-site.com/web-desig ...

  5. ngrok内网穿透利器在windws下的使用

    1.到官网下载windows版本:https://ngrok.com/download 2.解压,双击“ngrok.exe” 3.输入“ngrok http 80”,会随机给你分配域名.见下图. ng ...

  6. 【10-25】OOP基础-飞机游戏知识点

    知识点 鼠标适配器类为抽象类,使用匿名子类实现鼠标事件的重写,创建一个鼠标适配器对象 添加鼠标事件监听器到JPanel对象实现鼠标的响应 创建定时器Timer对象,在定时器的任务列表方法schedul ...

  7. 【9-2】mysql数据库学习01

    mysql安装 下载社区版本MySQL软件包(地址),或者windows installer 接压缩安装包到目标路径 在系统变量Path中加入目标路径 在mysql安装路径下,修改配置文件mysql- ...

  8. SqlServer代理执行[分发清除: distribution] 无法删除快照文件

    每天偶尔检查数据库作业是否失败,发现有错误 select top 10 job_id,run_date,run_time,run_duration,step_name,message from  ms ...

  9. linux下安装python环境

    1.linux下安装python3 a. 准备编译环境(环境如果不对的话,可能遇到各种问题,比如wget无法下载https链接的文件) yum groupinstall 'Development To ...

  10. EasyUI中datagrid控件的使用 设置多行表头(两行或多行)

    EasyUI中的datagrid控件十分强大,能生成各种复杂的报表,现在因为项目需要,需要生成一个表头两行的表,找了一些说明文档,以下用一个实例来说明一下: 第一种方法: $('#divData'). ...