diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-03-20 23:45:47 +0100 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-07-19 20:40:28 +0200 |
commit | c34fcd63f05044f9034b26c52f19c91e04668da7 (patch) | |
tree | 8ef449218cf736057197cd39fba1dac6117216c3 /src/value/value.c | |
parent | 917a7031d946c0b608517936fab0f54689167265 (diff) |
openrc: dynamic paths for user services
add two api functions, `rc_service_dir` and `rc_sysconf_dir`, both are
generate paths (and sub-paths) for resources, and meant to replace the
hardcoded variables like `RC_SVCDIR`.
those functions differ by dynamically switching between the system path,
or the user path, set in their home folder or runtime directory.
this lays out the intial support for user services.
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'src/value/value.c')
-rw-r--r-- | src/value/value.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/value/value.c b/src/value/value.c index e5190379..7cd17a31 100644 --- a/src/value/value.c +++ b/src/value/value.c @@ -30,6 +30,9 @@ int main(int argc, char **argv) char *option; applet = basename_c(argv[0]); + if (rc_yesno(getenv("RC_USER_SERVICES"))) + rc_set_user(); + if (service == NULL) eerrorx("%s: no service specified", applet); |