[systemd-devel] How to stop socket-actived inetd-like service?

Petr Pisar ppisar at redhat.com
Thu Dec 20 05:01:25 PST 2012


Hello,

having cvs.socket:

[Unit]
Description=CVS Server Activation Socket
[Socket]
ListenStream=2401
Accept=true
[Install]
WantedBy=sockets.target

and cvs at .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?

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 at .service is not valid.
Failed to issue method call: Unit name cvs at .service is not valid.
# systemctl stop cvs.service
Failed to issue method call: Unit cvs.service not loaded.

How can I do it?

-- Petr



More information about the systemd-devel mailing list