1 2 3 4 5 6 7 8 9 10 11 12
[Unit] Description="Container: %i" [Service] Type=simple ExecStart=/usr/bin/container start --name %i --nspawn ExecStartPost=/usr/bin/container start --name %i --start ExecStopPost=/usr/bin/container stop -n %i --clean KillMode=mixed [Install] WantedBy=multi-user.target