home
documentation:avfilter avfilter_sig avfilter.conf
version 3.5; page generated 2019-03-13

AVFILTER_SIG(8)

 

NAME

avfilter_sig - signal avfilter to reload  

SYNOPSIS

avfilter_sig [-l] [-p pid] ["reload" ["config" | "virus"]]

avfilter_sig --help | --version  

DESCRIPTION

In the first form, avfilter_sig sends a signal to avfilter so that the latter reloads its configuration file, the virus data base, or both. The configuration file name cannot be changed this way.

The process id of avfilter can be overridden with -p, which also changes the pipe name to the current directory; if not using -p, the id is read from avfilter pid file.

A named pipe is used to read the response. Existence of the pipe is tested to avoid concurrent requests. When the -p option is used avfilter_sig uses ``./avfilter_sig.pipe'' as the pipe name.

The output from avfilter, read through the pipe, is displayed on stdout unless the -l option is given. In the latter case it is sent to syslog.

The signal sent is:

HUP
If neither "config" nor "virus" is specified.
USR1
For "config", to reload configuration.
USR2
For "virus", to reload the virus data base.
 

EXIT STATUS

Exit status is 0 if ok, 1 for daemon error, higher for other errors including daemon not running, pipe already in use, etc.  

EXAMPLE

Users of freshclam can set:

        OnUpdateExecute avfilter_sig -l reload virus 

Other (unofficial) scripts have similar reload_opt, which can be set likewise.

If avfilter_sig is not in $PATH (it is installed in ${exec_prefix}/sbin), specify its full path; (freshclam issues a system(3) call to execute it).

Mind permissions; avfilter and freshclam likely run with as different users. Setting avfilter_sig setuid ("chmod u+s") is the easiest solution. You can also "./configure --with-setuid-sig" to get that. The requirements are that avfilter_sig can read avfilter.pid and send signals to avfilter, and that avfilter can write to the pipe created by avfilter_sig.  

PIPE PERMISSIONS

avfilter_sig creates a user-writable pipe. If it detects its effective UID is not Courier's, it makes the pipe group-writable. In that case, it will also attempt to change the pipe ownership to Courier's. Thus, an adequate assignment of group memberships may work.  

FILES

/var/run/courier/avfilter.pid

/var/run/courier/avfilter_sig.pipe

./avfilter_sig.pipe (when using -p)  

AUTHOR

Alessandro Vesely <vesely@tana.it>  

SEE ALSO

freshclam.conf(5), avfilter(8)

Copyright © 2014-2019 Alessandro Vesely