mirror_lxc/config/init/upstart/lxc-instance.conf
AnrDaemon abf28de1e6 Force lxc-instance to behave like a good Upstart client
Remove unnecessary shell wrap around job start.
Force foreground execution to allow job monitoring and control.

Signed-off-by Andrey Repin <anrdaemon@yandex.ru>
2016-06-24 06:19:51 +03:00

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