在主管运行的bash脚本中无法访问Linux环境变量

时间:2018-07-27 12:56:04

标签: linux bash environment-variables supervisord

操作系统:ubuntu 14.x 环境变量在/ etc / environment

中定义

导出MY_VAR="Fom Xong"

my_bash.sh

 #!/bin/bash

echo "My_VAR Value: $MY_VAR"

如果我使用./my_bash运行脚本,则效果很好。

但是如果在主管中给出,它将不起作用

command = /var/www/myapp/web/bash/my_bash.sh

有任何线索吗?

0 个答案:

没有答案