Is it possible to run the script on the host after the container starts?

Dec 25, 2017
23
0
21
35
I'm trying to do this:

test.sh
#!/bin/bash
/mnt/.../test2.sh&

test2.sh
#!/bin/bash
sleep 10
echo "test" > /root/test.txt

104.conf
lxc.hook.pre-start: /mnt/.../test.sh

In this case, the container wait for 15 seconds, creates a file, and then starts.

104.conf
lxc.hook.pre-start: /mnt/.../test2.sh&

In this case, container doesn't start, but the script is executed.

Is it possible to run the script on the host after the container starts?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!