skarnet / execline

The execline scripting language
https://skarnet.org/software/execline/
ISC License
149 stars 19 forks source link

data dir copied for oneshot scripts? #8

Closed hongkongkiwi closed 3 years ago

hongkongkiwi commented 3 years ago

It says in the documentation that the env and data dir are copied to the service directory.

So therefore I can use relative paths in my up/down/run scripts.

But it seems that the data dir is not copied for oneshot scripts, is this true or am I doing something wrong?

I found something in the mailing list about it, but it was just a passing reference, so wanted to clarify.

skarnet commented 3 years ago

This is a s6-rc question. env and data directories are not used for oneshot scripts, because oneshot scripts are pure command lines - they live in the s6-rc database. env and data are only valid for longruns, which have service directories.

For oneshot scripts, you need to decide on a global directory to put your data in, and reference it in your oneshot scripts. You have the whole filesystem to choose from, s6-rc doesn't enforce any policy on you. :-)