linux关闭systemd服务,systemd停止服务时有顺序吗?

https://serverfault.com/questions/785127/how-to-stop-systemd-services-in-specific-order/785355

You control the shutdown order by specifying Before= and After= in the unit files to describe the startup order. The inverse order is applied when shutting down.

Here's what the official docs have to say about it:

...when two units with an ordering dependency between them are shut down, the inverse of the start-up order is applied. i.e. if a unit is configured with After= on another unit, the former is stopped before the latter if both are shut down...

【 在 Mullet 的大作中提到: 】

: 启动时会根据.service中的Before、After、Wants、Requires来控制,那停止的时候呢?是不是就正好是跟启动相反的顺序?后启动的先停止?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值