mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
initctl: add the settings of a service to the JSON status
initctl -j status had the state of a service but little of how it is
set up. A program reading it could not tell how the service is
stopped, what scripts it runs, or how it signals readiness.
Add the settings: stop, reload, notify, remain, scripts, directories,
cgroup-config, rlimits, log or tty, provides, conflicts, if, groups,
capabilities, pam, name, id, protected, and nowarn. The restart
object also gets sec, respawn, and oncrash, and the state Finit keeps
for its own use goes in internal:
"stop": {
"signal": "SIGTERM",
"timeout": 3,
"scope": "pgroup"
},
"scripts": {
"exec-stop-post": { "command": "/bin/true", "timeout": 7 }
},
initctl reads the status over D-Bus first, so each setting is also a
property of org.finit.Service1. The new test checks that the JSON is
the same over D-Bus as over the initctl socket.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
12 files changed
+893
-29
No files matched your search
@@ -95,6 +95,7 @@ char *code2str (int code);
|
||||
int str2rlim (char *str);
|
||||
char *rlim2str (int rlim);
|
||||
char *lim2str (struct rlimit *rlim);
|
||||
char *rlimits2str (struct rlimit *rlimit, char *buf, size_t len);
|
||||
|
||||
void do_sleep (unsigned int sec);
|
||||
void do_usleep (unsigned int usec);
|
||||
|
||||
Reference in new issue
Block a user