I try to execute hookscript.
I successfully added hookscript from documentation /usr/share/pve-docs/examples/guest-example-hookscript.pl and I see it's beeng executed in gui taks log:
So it's working.
Now I want to execute command inside this container so I've added this command inside my hookscript:
but it's not creating no file inside container 112
How can I run script inside container just before shuting it down or after start?
I successfully added hookscript from documentation /usr/share/pve-docs/examples/guest-example-hookscript.pl and I see it's beeng executed in gui taks log:
Code:
GUEST HOOK: 112 pre-start
112 is starting, doing preparations.
GUEST HOOK: 112 post-start
112 started successfully.
TASK OK
Now I want to execute command inside this container so I've added this command inside my hookscript:
Code:
system "pct exec 112 -- bash -c 'touch testfile'";
How can I run script inside container just before shuting it down or after start?
Last edited: