[systemd-devel] 回复: 回复: 回复: 回复: [systemd-de vel] sys temctl can't execute stop actually,whenservice isstarted by other way

清辰 624001899 at qq.com
Sat Oct 28 07:29:41 UTC 2017


Hi Lennart, 


'systemctl enable xxx.service' can let xxx.service be automatically started when host start. Can it make sure that 'systemctl stop xxx.service' will be executed automatically when host shutdown?




------------------ 原始邮件 ------------------
发件人: "Lennart Poettering"<lennart at poettering.net>; 
发送时间: 2017年10月27日(星期五) 晚上6:27
收件人: "清辰"<624001899 at qq.com>; 
抄送: "Oliver Neukum"<oneukum at suse.com>; "systemd-devel"<systemd-devel at lists.freedesktop.org>; 
主题: Re: 回复: [systemd-devel] 回复: 回复: [systemd-de vel] sys temctl can't execute stop actually,whenservice isstarted by other way



On Fr, 27.10.17 18:25, 清辰 (624001899 at qq.com) wrote:

> When executing 'service xxx restart', actually systemd will execute 'service xxx start', and then 'service xxx stop'.
> But my restart action is different from stop action, can I customize my 'restart'?

First of all, note that systemd does not actually provide a "service"
tool. It provides "systemctl", and your downstream distros map
"service" to "systemctl".

And no, in systemd we give the guarantee that restarts are equivalent
to stop+start, and you cannot customize that.

Lennart

-- 
Lennart Poettering, Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171028/e65042a9/attachment.html>


More information about the systemd-devel mailing list