[systemd-devel] failure to disable a servie from restarting

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Jan 12 13:33:33 PST 2013


On Fri, Jan 11, 2013 at 08:20:45PM +0100, Reindl Harald wrote:
> 
> 
> Am 11.01.2013 19:47, schrieb Paul Wouters:
> > So the daemon restarts all the time. So let's tell systemd to disable
> > it, while leaving the service running:
> > 
> > [root at west ~]# systemctl disable ipsec.service
> > [root at west ~]# pidof pluto
> > 1992
> > [root at west ~]# killall -9 pluto
> > [root at west ~]# pidof pluto
> > 2095
> > 
> > So I guess the man page is either lying or the disasble command is not
> > working as expected.
The part that you quoted even explicitly says that 'systemctl disable'
has no effect on the running system!

> "systemctl stop ipsec.service" is your friend NOT disable
> 
> disable controls if the service is started at boot or not
> and has logically no effect on a running service because
> "systemctl disable httpd.service" does usually not mean
> "stop it now", it means "start it not on the next boot"
> 
> why?
> because you can "systemctl start" a service which is not enabled
> at all and if it contains "Restart=always" you normally expect
> it to get restartet

Also see http://0pointer.de/blog/projects/three-levels-of-off.html .

Zbyszek


More information about the systemd-devel mailing list