diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-02-05 02:02:00 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-02-05 02:03:10 +0100 |
commit | c7040b5d1c2c148f12b6a5eef3dfce1661805131 (patch) | |
tree | dc82be22b8c2ee12913b6723ddf148f8fadeb917 /src/core/dbus-kill.c | |
parent | 7b1796403ae1ed0c3299867874cc82ed3ed413a6 (diff) |
core: allow User=, Group=, Nice=, Environment=, Type= to be passed when creating a transient service
Diffstat (limited to 'src/core/dbus-kill.c')
-rw-r--r-- | src/core/dbus-kill.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/dbus-kill.c b/src/core/dbus-kill.c index 8d3e149f33..f3cfb226e8 100644 --- a/src/core/dbus-kill.c +++ b/src/core/dbus-kill.c @@ -70,6 +70,24 @@ int bus_kill_context_set_transient_property( return 1; + } else if (streq(name, "KillSignal")) { + int sig; + + r = sd_bus_message_read(message, "i", &sig); + if (r < 0) + return r; + + if (sig <= 0 || sig >= _NSIG) + return sd_bus_error_setf(error, "Signal %i out of range", sig); + + if (mode != UNIT_CHECK) { + c->kill_signal = sig; + + unit_write_drop_in_private_format(u, mode, name, "KillSignal=%s\n", signal_to_string(sig)); + } + + return 1; + } else if (streq(name, "SendSIGHUP")) { int b; |