mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-05 01:42:33 +00:00

Remove unnecessary shell wrap around job start. Force foreground execution to allow job monitoring and control. Signed-off-by Andrey Repin <anrdaemon@yandex.ru>
21 lines
446 B
Plaintext
21 lines
446 B
Plaintext
description "lxc instance"
|
|
author "Christian Kampka <chris@emerge-life.de>"
|
|
|
|
stop on stopping lxc
|
|
|
|
# wait for 120 seconds for container to shutdown before killing it
|
|
kill timeout 120
|
|
|
|
# send SIGPWR to container to trigger a shutdown (see lxc-shutdown(1))
|
|
kill signal SIGPWR
|
|
|
|
|
|
instance $NAME
|
|
usage "NAME=name of LXC instance"
|
|
|
|
pre-start script
|
|
lxc-wait -s RUNNING -n $NAME -t 0 && { stop; exit 0; } || true
|
|
end script
|
|
|
|
exec lxc-start -F -n $NAME
|