문제

I'm using a pre_start action hook to add some new paths to the PATH and LD_LIBRARY_PATH environment.

after git push I can see that variables are updated, however when I ssh to the server, added variables are not available, after some googling I found out this is happening because these variables are exported as a sub-shell.

openshift documentations suggest to add variables using set-env command, but when run it I get following error

rhc set-env PATH=$OPENSHIFT_DATA_DIR/bin:$PATH" -a srv
Setting environment variable(s) ... PATH cannot be overridden

Does anybody know how we can overcome this?

도움이 되었습니까?

해결책

If I'm guessing correctly at what you're ultimately trying to accomplish, your trying to write your own cartridge. Recently we just added a new environment variable OPENSHIFT_yourcartname_LD_LIBRARY_PATH_ELEMENT. You can use this environment variable to configure the location of each cartridge's library files

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top