From c34fcd63f05044f9034b26c52f19c91e04668da7 Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Wed, 20 Mar 2024 23:45:47 +0100 Subject: 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 --- src/service/service.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/service') diff --git a/src/service/service.c b/src/service/service.c index 2545a022..18da90cd 100644 --- a/src/service/service.c +++ b/src/service/service.c @@ -32,6 +32,9 @@ int main(int argc, char **argv) RC_SERVICE state, bit; applet = basename_c(argv[0]); + if (rc_yesno(getenv("RC_USER_SERVICES"))) + rc_set_user(); + if (argc > 1) service = argv[1]; else -- cgit v1.2.3