openvz startup scripts for clients

pfmasse60

New Member
Feb 16, 2010
10
0
1
I need to execute the below bash script or any startup script each time I start a particular openvz container. However I forgot the location it needs to be in for this to happen.

#!/bin/bash
sleep 1
/bin/mount -n --bind /test /var/lib/vz/root/${VEID}/media/testmount
exit $?

Please show me the location and process of running a startup script.

Thank you.
 
see /etc/vz/conf/
 
see /etc/vz/conf/

I remember it having to do with this directory. So do I simply put my scrips in there and name the according to the container they are responsible for?

i.e. for openvz 103 would I put a file 103.mount in /etc/vz/conf, make it executible and put my bash script in it?
 
yes, but do tests.