I'm trying to wrap my head around s6 supervisor suite. I've figured out run and log but I'm stuck with s6-envdir and I'm not sure how do I use it.
I see that environment variable gets set, but I can't access it.
To illustrate:
# According to the docs, set a variable
cat /local/s6/services/ping_stdout/env/PING_HOST
ya.ru
# Make sure there's no such variable in my current env
env | grep PING_HOST
echo $?
1
# Make sure it gets exported if I use s6-envdir
s6-envdir /local/s6/services/ping_stdout/env env | grep PING_HOST
PING_HOST=ya.ru
# Now try to get it printed
s6-envdir /local/s6/services/ping_stdout/env echo "=== ${PING_HOST} ==="
=== ===
It's not used, but if I try to use something that already is in my env, no problem:
s6-envdir /local/s6/services/ping_stdout/env echo "=== ${ZSH} ==="
=== /home/hoodoo/.oh-my-zsh ===
Did I get something wrong?
How do I use the variables set with s6-envdir?