DBUS API to restart unit by sending sigkill/sighup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Is there is dbus API for systemd to restart unit by sending sigkill /sighup ?
https://www.freedesktop.org/wiki/Software/systemd/dbus/
RestartUnit(in  s name, in  s mode, out o job);
My requirement is to have a way to restart unit by sending sigkill or sighup (user can specify ) also along with sigterm.
Since that dbus APi does not seem to exists, to achieve same effect ,
I can use KillUnit() API to send custom signal and then use  StartUnit().
KillUnit(in  s name, in  s who,   in  i signal);
StartUnit(in  s name, in  s mode,  out o job); 
 
Is that correct understanding ?
One issue with this is how to know when to do  StartUnit() after KillUnit() since KillUnit() may not have completed stopping unit yet.
Regards


_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux