Files
ilnmors-homelab/config/services/systemd/vmm/libvirt/services/app.service
2026-03-15 04:41:02 +09:00

24 lines
570 B
Desktop File

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