'Twas brillig, and Petr Pisar at 20/12/12 13:01 did gyre and gimble: > Hello, > > having cvs.socket: > > [Unit] > Description=CVS Server Activation Socket > [Socket] > ListenStream=2401 > Accept=true > [Install] > WantedBy=sockets.target > > and cvs@.service: > > [Unit] > Description=CVS Server > After=local-fs.target > [Service] > Environment=HOME=/var/cvs > ExecStart=-/usr/bin/cvs -f --allow-root=/var/cvs pserver > StandardInput=socket > > How can I stop all running instances?
You probably want to put: PartOf=cvs.target Into your cvs@.service file (assuming you have a semi-recent systemd version). That way you can do "systemctl stop cvs.target" and it will kill all instances. You will also have to ship a simple .target file too. > I start cvs.socket, I connect client to the TCP port, and now I want to > stop all instances. Stopping cvs.socket disappears listening socket, but > remaining cvs@*.service instances are still running. My naive attept to > stop ther service is not recognized by systemctl: > > # systemctl stop cvs\@.service > Failed to issue method call: Unit name cvs@.service is not valid. > Failed to issue method call: Unit name cvs@.service is not valid. > # systemctl stop cvs.service > Failed to issue method call: Unit cvs.service not loaded. You can control individual units doing: "systemctl stop cvs@foo.service" (where @foo matches what "systemctl list-units" returns). HTHs Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel