【Supervisor】使用 Supervisor source command not found 如何解决
结论:
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 如何解决的更多相关文章
- source command not found in sh shell解决办法
在Ubuntu系统中执行脚本的时候突然出现错误"source command not found in sh shell" 这个其实在Ubuntu 当中 执行脚本默认的使用的是da ...
- learning uboot source command
reference: http://www.denx.de/wiki/DULG/UBootCmdGroupExec => help source source - run script from ...
- Ubuntu解决sudo: source: command not found错误
Ubuntu Server上执行以下命令,可以看到默认打开的文件数限制为1024个. $ ulimit -n 1024 编辑/etc/profile配置文件,在最后添加一行: ulimit -SHn ...
- zsh: command not found: pip 解决方法
出现zsh: command not found: xxx解决方法: 把 bash shell 中.bash_profile 全部环境变量加入zsh shell里就好 step1: Term执行 op ...
- Centos命令行报bash:.....:command not found的解决办法
命令行报bash:.....:command not found的解决办法(几乎所有命令) 命令行输入命令执行后报“bash:....:command not found”这是由于系统PATH设置 ...
- mysql导入导出sql文件,source导入速度慢的解决办法
1.导出整个数据库mysqldump -u 用户名 -p 数据库名 > 导出的文件名mysqldump -u dbuser -p dbname > dbname.sql2.导出一个表mys ...
- 升级时针对Source oracle home 不存在解决办法
针对于oracle升级从11.2.0.4升级至12.1.0.1,遇到的问题解决. 运行/oracle/app/product/12.1.0.1/dbhome_1/bin/dbua 后 在选择数据库ho ...
- django-admin:command not found的解决办法
django-admin:command not found的解决办法 找到django-admin的路径 绝对路径 然后用命令行运行 python3 /usr/local/python3/lib/ ...
- nslookup:command not found的解决办法
nslookup:command not found的解决办法 通过nslookup查看DNS记录,在这里遇到了一个小插曲,nslookup:command not found(未找到命令),是因为新 ...
随机推荐
- 如何让Chrome浏览器可以加载本地XML文件?
Chrome浏览器的安全限制,禁止本地加载XML等外部文件,如何设置让其可以加载呢? 有两种方法,第一种是在本地服务器环境下浏览,采用 http://localhost/ 的方式浏览你的网页和文件,就 ...
- Django笔记-字符编码相关问题整理
1.添加中文注释后编译出错,提示:Non-ASCII 解决方法: 在Python脚本文件的第一行或第二行添加一句: #coding:gbk或#coding:utf-8或##-*- cod ...
- PHP file_get_contents设置超时处理方法
从PHP5开始,file_get_content已经支持context了(手册上写着:5.0.0 Added the context support. ),也就是说,从5.0开始,file_get_c ...
- maven test 运行 指定类或方法 打包 mvn clean assembly:assembly
>mvn test -Dtest=[ClassName] 运行测试类中指定的方法:(这个需要maven-surefire-plugin:2.7.3以上版本才能支持) >mvn test ...
- 总结一下安装linux系统经验-版本选择-安装ubuntu
linux版本选择: 初次接触,建议选 Ubuntu 或者 Fedora,这两个发行版都很容易上手,而且两者都有很强大的中文社区,遇到问题比较容易解决,而且都有国内的源,安装或者更新软件时体验相对会好 ...
- ajax实例详解
页面通过ajax和后台进行数据交互是非常简洁且方便的.特别是封装成json数据格式. 此处使用的是jQuery的ajax var params = { version:new Date().getTi ...
- \n\t\r代表什么意思
\t水平制表(跳到下一个tab位置)\r回车(将当前位置移到本行开头)\n换行(将当前位置移到下一行行开头)
- 30秒搭建Github Page
如果中国每个程序员都写博客,那么中国IT届的春天就来了 原文转自我的前端博客,链接:http://www.hacke2.cn/create-github-page/ 有同学问我的网站是怎么创建的,其实 ...
- PHP支付宝接口RSA验证
这两天一直困扰的PHP RSA签名验证问题终于解决了,由于之前RSA接触的不多,再加上官方至今还未有PHP的SDK可供参考,因此走了一些弯路,写在这里和大家分享. 虽然支付宝官方还未提供相关SD ...
- POJ 2299 Ultra-QuickSort
离散化+树状数组求逆序数 Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 35024 Accept ...