Daemon to run and manage FastCGI processes, mainly fastcgi-mono-server.
- Automatic start and stop FastCGI processes;
- Recovering processes;
- Designed as service;
- Starting the process on behalf of any user;
- Support for event processing start and stop individual processes;
- Threads based.
HTAN.Runner is licensed under the Apache License Version 2.0.
- Debian 7 or 8;
- Mono >= 4.2.2.
NOTE: Earlier versions have not been tested.
You can use the automatic installation through HTAN:
su -l root
chmod u=rx,g=rx /usr/lib/htan/installers/htan-runner
/usr/lib/htan/installers/htan-runner
Or installation through install.sh
:
su -l root
chmod u=rx,g=rx ./install.sh
./install.sh
To remove daemon use command:
sudo update-rc.d -f htan-runner remove && sudo rm -r /etc/init.d/htan-runner
The principle work of HTAN.Runner is similar to Nginx or Apache.
Create in the folder /etc/htan/app-available
configuration files for your applications.
For example, file /etc/htan/app-available/example.conf
:
<configuration>
<fastCGI>
<add address="unix:/tmp/example.org" command="fastcgi-mono-server4" />
</fastCGI>
<commands>
<add name="fastcgi-mono-server4"
exec="fastcgi-mono-server4"
arguments="/applications=/:/home/example.org/www/ /socket={socket} /multiplex=True /verbose=True"
/>
</commands>
</configuration>
To activate the application, create a symbolic link:
sudo ln -s /etc/htan/app-available/example.conf /etc/htan/app-enabled
For the changes to take effect, restart htan-runner:
sudo service htan-runner reload
The configuration files must be in XML format.
Recommended to use the extension .conf
for file names.
All nodes must be in the root node configuration
.
The fastCGI
node contains a list of addresses to start.
Parameter | Description |
---|---|
address |
Specifies the address to listen on. Valid values are "pipe", "unix", and "tcp". For example: unix:/tmp/example.org , tcp:127.0.0.1:9100 .The address will be replaced by substituted for the marker {socket} in the specified command.
|
command |
Command or command name (<commands /> ) which should be run via start-stop-daemon .For example:
|
beforeStartingCommand (optional) |
Command, command name or URL to be executed before executing the command .For example:
|
afterStartingCommand (optional) |
Command, command name or URL to be executed after starting the command .For example:
|
beforeStoppingCommand (optional) |
Command, command name or URL to be executed before stopping. |
afterStoppingCommand (optional) |
Command, command name or URL to be executed after stopping. |
stoppingTimeout (optional) |
Maximum waiting time stopping the process (in seconds). Default: 10 seconds.
|
The commands
node contains a list of available commands.
Parameter | Description |
---|---|
name |
Command name. Any convenient set of characters. For example: myCommandName .
|
exec |
Command line to be executed. For example:
|
arguments (optional) |
Additional arguments that will be passed to the command. For example:
|
user (optional) |
User name under which the command is executed. Default: root .
|
group (optional) |
Group name under which the command is executed. Default: root .
|
To disable the application, just to remove a symbolic link and restart the service:
sudo rm /etc/htan/app-enabled/example.conf
sudo service htan-runner reload
Log of the program can be found at: /var/log/htan/runner.log