Friday, February 17, 2012

How can I run service inside LVE?

It is possible to wrap service in lve using lve-wrappers. To do that, install lve-wrappers first:
# yum install lve-wrappers
Then mv service that you want to wrap like:
# mv /etc/init.d/[service_name] /etc/init.d/[service_name].orig
Create a new script to start service instead:
# cat <<END > /etc/init.d/[service_name]
#!/bin/sh
lve_suwrapper [LVE_ID] /etc/init.d/[service_name].orig $@
END

# chmod +x /etc/init.d/[service_name]

# service [service_name] restart

That should be it.
You can specify any number as LVE_ID, just make it large enough so it would not clash with user id from /etc/passwd file

0 comments:

Post a Comment