]> git.proxmox.com Git - pve-container.git/commit - src/PVE/LXC.pm
add pre- start/stop hookscript to containers
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 31 Jan 2019 13:33:40 +0000 (14:33 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 1 Feb 2019 12:08:47 +0000 (13:08 +0100)
commit1a41643334b7de9fae0ee3cbbca1830dd972cb62
treeb3bc0f404bfa5039662520513d4377871cb23c0d
parentb7d72f30bc1b9c32b1230634e6f831579fdb74e4
add pre- start/stop hookscript to containers

this adds the config (hookscript) and executes it on four points in
time for the container:

'pre-start'
'post-start'
'pre-stop'
'post-stop'

on pre-start we abort if the script fails and pre-stop will not be
called if the vm crashes or if the vm gets powered off from inside
the guest

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/LXC.pm
src/PVE/LXC/Config.pm
src/lxc-pve-poststop-hook