mirror_lxc/config/init/systemd/lxc@.service.in
JD Friedrikson c08d29b6d1
Use lxc-stop to stop systemd service
Ever since 8eb62c2, systemd has not been able to cleanly stop lxc
containers (via lxc@) because it's still using SIGPWR for systemd-based
containers.

We should now use the nice logic in 330ae3d to stop the containers
instead.

Signed-off-by: JD Friedrikson <yours@decompo.site>
2017-05-31 18:04:37 -04:00

22 lines
438 B
SYSTEMD

[Unit]
Description=LXC Container: %i
# This pulls in apparmor, dev-setup, lxc-net
After=lxc.service
Wants=lxc.service
Documentation=man:lxc-start man:lxc
[Service]
Type=simple
KillMode=mixed
TimeoutStopSec=120s
ExecStart=@BINDIR@/lxc-start -F -n %i
ExecStop=@BINDIR@/lxc-stop -n %i
# Environment=BOOTUP=serial
# Environment=CONSOLETYPE=serial
Delegate=yes
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=multi-user.target