Re: [systemd-devel] 回复: systemctl can't execute stop actually, whenservice is started by other way

2017-06-28 Thread Lennart Poettering
On Wed, 28.06.17 16:38, 清辰 (624001...@qq.com) wrote:

> Hi Lennart,
> 
> Thank you for your reply.
> 
> Is there a way to execute stop actually, even the status is inactive.

No there is not. system will only allow stopping of services that are
actually started.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] 回复: systemctl can't execute stop actually, whenservice is started by other way

2017-06-28 Thread Amish

On Wednesday 28 June 2017 02:08 PM,  wrote:


Is there a way to execute stop actually, even the status is inactive.

On Tue, 27.06.17 13:48,  (624001...@qq.com 
) wrote:


> for example: service nscd
> 1.execute: systemctl stop nscd.service
>   stop nscd process actually
> 2.execute: /usr/bin/nscd
>   start nscd by shell command


Why dont you (or your script) start it with:
systemctl start nscd

Then status and stop will also work as expected.

Amish.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel