#
# /etc/sysconfig/ufdbguard
#
# $Id: sysconfig.ufdbguard.in,v 1.15 2020/10/22 07:21:28 root Exp root $

# Request a trial license on www.urlfilterdb.com and you will
# receive a username and password to download the URL database for URLfilterDB.
# Until version 1.30 the following two parameters were set in ufdbUpdate:
DOWNLOAD_USER=""
DOWNLOAD_PASSWORD=""

# If the download of the URL database or the upload of uncategorised URLs must be done via a proxy,
# set the following two parameters:
PROXY_USER=""
PROXY_PASSWORD=""
export PROXY_USER
export PROXY_PASSWORD
# and also must set:
# export http_proxy=
# export https_proxy=

# If non-empty, the following email address is used to notify URL database download failures
ADMIN_EMAIL=""

BLACKLIST_DIR="/var/lib/ufdbguard/blacklists"
CONFIGDIR="/etc/ufdbguard"
BINDIR="/usr/sbin"
PIDDIR="/var/run/ufdbguard"
PIDFILE=$PIDDIR/ufdbguardd.pid

# Optional parameters
# -T for test mode
# -w NNN to increase the number of worker threads (max 140).
# -U USERNAME  to switch from root to USERNAME
# -c CONFIGFILE to read an alternate configuration file
UFDB_OPTIONS=""
export UFDB_OPTIONS

# Optionally use a non-root account to run the ufdbguardd and ufdbhttpd daemons
RUNAS="ufdb"
export RUNAS

# version of ufdbGuard software
VERSION="1.35"
API_VERSION="none"
UFDB_UPDATE_SENDS_SIGNAL="yes"

# On some systems, regular expression matching is much faster with LANG=C
LANG=C
export LANG

# On systems with glibc >= 2.10 the memory allocator (malloc) uses anonymous memory regions of 
# 64 MB (1 mapped region per thread with a maximum of 8 * the number of CPU cores) on 64bit systems.
# This is not harmful except that this method causes the process to have a huge virtual size:
# The working set size is about 400 MB while the total virtual process size is almost 5 GB.
#
# Since ufdbguard is optimised to use many static buffers and uses malloc relatively
# infrequently, it is possible to reduce the number of anonymous memory regions to 70,
# which is the minimum number of worker threads + 6.
MALLOC_ARENA_MAX=70
export MALLOC_ARENA_MAX

