Customizing Domains with virtDomain.sh

Parallels Pro Control Panel allows you to customize any new domain that you create by using the customization script, virtDomain.sh. Once the customization is complete, all new domains you create reflect the changes made by your script. However, existing domains remain unchanged unless you manually execute the virtDomain.sh script (passing the correct arguments and password) for those domains.

To use this option, follow these steps before you create a domain.

Caution: The Apache Web server is compiled with suexec support, which is sensitive to security issues and does not run CGI scripts that do not conform to its standards. If your virtDomain.tar file installs scripts into the domain's cgi-bin directory, you must set the cgi-bin permissions to ownership by the Site Administrator and turn off group and other write privileges by using the chmod 0755 command.

You must exercise caution while customizing domains using the virtDomain.sh script. Improper usage can adversely affect the functioning of all new domains that you create.

The customization process works as follows:

Once you have created a new domain and assigned services to it (using the Site Manager option on the Server Administrator page), Parallels Pro Control Panel looks in the directory /etc/appliance/customization for the file virtDomain.tar. If it finds this file, it untars the file into the root directory of the chroot file system.

After the file is unpacked, Parallels Pro Control Panel runs the executable script virtDomain.sh as root. On the command line, the script receives the following three arguments.

The script receives the password of the newly created domain from the standard input. If it encounters any errors, it displays them in the Details window of the Server Administrator control panel.

Important: CLI scripts reside in the directory /usr/local/bin. You must include the full path name for the CLI script that you are calling - that is, /usr/local/bin/<CLI script>. Using the script to automatically customize a domain will fail if the script calls the required CLI script without including the full path name.

In this section:

Transferring File Permissions to the New Domain Owner

Using Script Hooks

editVirtDomain.sh

Notifying Site Administrators When Sites Are Modified

enableVirtDomain.sh

disableVirtDomain.sh

deleteVirtDomain.sh