通过操作挂钩

时间:2017-01-25 21:33:42

标签: openshift

我试图通过动作挂钩设置一些环境变量,但它无法添加这些变量,这是我的启动脚本:

#!/bin/bash
# The logic to start up your application should be put in this
# script. The application will work only if it binds to
# $OPENSHIFT_DIY_IP:8080
nohup $OPENSHIFT_REPO_DIR/diy/testrubyserver.rb $OPENSHIFT_DIY_IP $OPENSHIFT_REP                                                                                                                                                             O_DIR/diy |& /usr/bin/logshifter -tag diy &

touch ~/app-root/data/test1

export GRADLE_USER_HOME=$OPENSHIFT_DATA_DIR/gradle
export GRADLE_HOME=$OPENSHIFT_DATA_DIR/gradle-1.6
export PATH=$GRADLE_HOME/bin:$PATH

export JAVA_HOME=/etc/alternatives/java_sdk_1.8.0
export PATH=$JAVA_HOME/bin:$PATH

touch ~/app-root/data/test2

现在我正在做那些2"触摸"确保脚本正在运行,它是,但从未设置变量。

1 个答案:

答案 0 :(得分:0)

尝试

export GRADLE_USER_HOME=${OPENSHIFT_DATA_DIR}/gradle