Changing variables in the HTTP mode unit file

March 5, 2024

ID 179872

You can configure Kaspersky Scan Engine by changing one or more variables in its unit file, %distr_kit%/etc/kavhttpd.service.

Changing the path to the Kaspersky Scan Engine PID file

You can change this variable if you want to create a PID file of Kaspersky Scan Engine in a directory other than /var/run/kavhttpd.pid.

The following example shows how this variable is set in the unit file:

PIDFile=/var/run/kavhttpd.pid

Changing environment variables

You must change these environment variables if Kaspersky Scan Engine is located in a directory other than /opt/kaspersky/ScanEngine.

The unit file uses the following environment variables:

  • SDKPATH—Specifies the directory where Kaspersky Scan Engine is located. The following example shows how this variable is set in the unit file:

    Environment=SDKPATH=/opt/kaspersky/ScanEngine

  • KL_PLUGINS_PATH—Specifies the path to the directory containing the PPL plug-in files used by Kaspersky Scan Engine. The following example shows how this variable is set in the unit file:

    Environment=KL_PLUGINS_PATH=/ppl

  • LD_LIBRARY_PATH—Specifies the path to the directory containing shared libraries used by Kaspersky Scan Engine. The following block shows how this variable is set in the unit file:

    Environment=LD_LIBRARY_PATH=/lib:/ppl

Changing paths in the command executed on kavhttpd startup

You must change paths in the command executed on kavhttpd startup if you put the kavhttpd executable file or the HTTP mode configuration file in directories different from the ones specified in the unit file, or if you want to create a PID file of Kaspersky Scan Engine in a directory other from /var/run/kavhttpd.pid.

The following example shows how this command is set in the unit file:

ExecStart=/bin/sh -c 'cd ${SDKPATH}/bin; ./kavhttpd -c /etc/kavhttpd.xml -p /var/run/kavhttpd.pid'

Monitoring enabling and disabling in the command executed on kavhttpd startup

You can enable or disable monitoring by adding or removing the -w option in the command executed on kavhttpd startup.

The following example shows how to enable monitoring in the unit file:

ExecStart=/bin/sh -c 'cd ${SDKPATH}/bin; ./kavhttpd -c /etc/kavhttpd.xml -p /var/run/kavhttpd.pid -w'

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.