Files
ilnmors-homelab/config/services/systemd/vmm/libvirt/services/auth.service.j2
T
2026-06-23 10:57:10 +09:00

24 lines
549 B
Django/Jinja

[Unit]
Description=auth vm
After=network-online.target libvirtd.service fw.service infra.service
Wants=fw.service infra.service
[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutStopSec=360
ExecStart=/usr/bin/virsh -c qemu:///system start auth
ExecStartPost=/bin/sleep 30
ExecStop=/bin/bash -c '\
/usr/bin/virsh -c qemu:///system shutdown auth; \
while /usr/bin/virsh -c qemu:///system list --state-running --name | grep -q "auth"; do \
echo "Waiting for auth to shutdown..."; \
sleep 2; \
done'
[Install]
WantedBy=default.target