add support for Foreground

git-svn: trunk@1334
remotes/push_mirror/metadata
Tomasz Kojm 21 years ago
parent a2959b2878
commit 5951212c9f
  1. 5
      clamav-devel/ChangeLog
  2. 2
      clamav-devel/configure
  3. 2
      clamav-devel/configure.in
  4. 3
      clamav-devel/docs/man/freshclam.1.in
  5. 8
      clamav-devel/etc/freshclam.conf
  6. 7
      clamav-devel/freshclam/freshclam.c
  7. 2
      clamav-devel/shared/cfgparser.c

@ -1,3 +1,8 @@
Sun Feb 13 10:55:35 CET 2005 (tk)
---------------------------------
* freshclam: add support for Foreground (requested by Jeremy Kitchen
<kitchen*scriptkitchen.com>)
Sun Feb 13 09:32:51 GMT 2005 (njh)
----------------------------------
* libclamav/message.c: Some files wouldn't uudecode correctly (reported

@ -2192,7 +2192,7 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
LC_CURRENT=1
LC_REVISION=6
LC_REVISION=7
LC_AGE=0
LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"

@ -22,7 +22,7 @@ AM_INIT_AUTOMAKE(clamav, "devel-`date +%Y%m%d`")
AM_CONFIG_HEADER(clamav-config.h)
LC_CURRENT=1
LC_REVISION=6
LC_REVISION=7
LC_AGE=0
LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
AC_SUBST(LIBCLAMAV_VERSION)

@ -40,6 +40,9 @@ Run as USER. By default (when started by root) freshclam drops privileges and wo
\fB\-d, \-\-daemon\fR
Run in a daemon mode. This option requires \-\-checks.
.TP
\fB\-f, \-\-foreground\fR
Run daemon in foreground. Useful for supervising freshclam with daemontools or runit.
.TP
\fB\-p FILE, \-\-pid=FILE\fR
Save daemon's pid in FILE.
.TP

@ -89,3 +89,11 @@ DatabaseMirror database.clamav.net
# Run command when database update process fails.
# Default: disabled
#OnErrorExecute command
# Don't fork into background.
# Default: disabled
#Foreground
# Enable debug messages in libclamav.
# Default: disabled
#Debug

@ -283,7 +283,10 @@ int freshclam(struct optstruct *opt)
}
bigsleep = 24 * 3600 / checks;
daemonize();
if(!cfgopt(copt, "Foreground"))
daemonize();
if (optc(opt, 'p')) {
pidfile = getargc(opt, 'p');
} else if ((cpt = cfgopt(copt, "PidFile"))) {
@ -420,7 +423,6 @@ void daemonize(void)
void help(void)
{
mprintf_stdout = 1;
mprintf("\n");
@ -437,6 +439,7 @@ void help(void)
mprintf(" --config-file=FILE read configuration from FILE.\n");
mprintf(" --log=FILE -l FILE log into FILE\n");
mprintf(" --daemon -d run in daemon mode\n");
mprintf(" --foreground -f run daemon in foreground\n");
mprintf(" --pid=FILE -p FILE save daemon's pid in FILE\n");
mprintf(" --user=USER -u USER run as USER\n");
mprintf(" --no-dns force old non-DNS verification method\n");

@ -93,7 +93,7 @@ struct cfgstruct *parsecfg(const char *cfgfile, int messages)
{"FollowDirectorySymlinks", OPT_NOARG},
{"FollowFileSymlinks", OPT_NOARG},
{"ExitOnOOM", OPT_NOARG},
{"Foreground", OPT_NOARG},
{"Foreground", OPT_NOARG}, /* clamd + freshclam */
{"Debug", OPT_NOARG},
{"LeaveTemporaryFiles", OPT_NOARG},
{"FixStaleSocket", OPT_NOARG},

Loading…
Cancel
Save