Last modified: 29 Aug 2007
WARNING: This documentation covers Parallels H-Sphere versions up to 3.1. For the latest up-to-date Parallels H-Sphere documentation, please proceed to the
official Parallels site.
Script-runner is a utility that launches H-Sphere scripts on Unix/Linux servers.
H-Sphere control panel establishes an SSH connection with a Unix box and
ssh -a -x email@example.com /hsphere/shared/scripts/script-runner.pl
Further, the control panel sends commands to the output stream of the SSH session
and script-runner reads and performs the commands and then outputs.
The format of command passed to script-runner is:
It starts with the keyword COMMAND followed by actual command. Then, if necessary,
it's followed by the parameters that are numbered from 1 and further.
All parts of the command are separated with the ampersand (&). The '=' symbol is
followed by the value. The command ends with the line feed character.
If the command requires standard input, you should set the INPUT parameter.
Commands are passed in the 8-bit ASCII encoding. Command parameters and standard input are passed in the URL-encoding.
Version 1.8 contains script-runner-b64 utility that has the same funcionality as script-runner,
but data should be passed in the Base64 encoding and it returns the result in the same encoding.
Script-runner returns output in the following format:
If there is an error during script execution, parameter ERROR will contain the error text and
output code EXIT_CODE will be nonzero. OUTPUT is a standard script output.
To check if script-runner is ready to accept commands, use 'PING' command. You should get the 'PONG' output.
Script-runner 1.8 logs all executed scripts and their output. They can be found in the /var/log/scriptrunner
directory on the box where script-runner is running.