1222,7 → 1222,7 |
groupdel havp 2>/dev/null |
fi |
groupadd -f havp |
useradd -r -g havp -s /bin/false -c "system user for havp" havp |
useradd -r -g havp -s /bin/false -c "system user for havp (antivirus proxy)" havp |
mkdir -p /var/tmp/havp /var/log/havp /var/run/havp |
chown -R havp:havp /var/tmp/havp /var/log/havp /var/run/havp |
[ -e /etc/havp/havp.config.default ] || cp /etc/havp/havp.config /etc/havp/havp.config.default |
1258,12 → 1258,31 |
/usr/bin/freshclam --no-warnings |
} # End of antivirus () |
|
################################################################## |
## Fonction "antivirus" ## |
## - configuration of havp, libclamav and freshclam ## |
################################################################## |
########################################################################## |
## Fonction "tinyproxy" ## |
## - configuration of tinyproxy (proxy between filterde users and havp) ## |
########################################################################## |
tinyproxy () |
{ |
tinyproxy_exist=`grep tinyproxy /etc/passwd|wc -l` |
if [ "$tinyproxy_exist" == "1" ] |
then |
userdel -r tinyproxy 2>/dev/null |
groupdel tinyproxy 2>/dev/null |
fi |
groupadd -f tinyproxy |
useradd -r -g tinyproxy -s /bin/false -c "system user for tinyproxy" havp |
mkdir -p /var/log/tinyproxy /var/run/tinyproxy |
chown -R tinyproxy:tinyproxy /var/log/tinyproxy /var/run/tinyproxy |
[ -e /etc/tinyproxy/tinyproxy.conf.default ] || cp /etc/tinyproxy/tinyproxy.conf /etc/tinyproxy/tinyproxy.conf.default |
$SED "s?^User.*?User tinyproxy?g" /etc/tinyproxy/tinyproxy.conf |
$SED "s?^Group.*?Group tinyproxy?g" /etc/tinyproxy/tinyproxy.conf |
$SED "s?^Port.*?Port 8090?g" /etc/tinyproxy/tinyproxy.conf # Listen Port |
$SED "s?^#Listen.*?Listen $PRIVATE_IP?g" /etc/tinyproxy/tinyproxy.conf # Listen NIC (only intif) |
$SED "s?^#LogFile.*?LogFile /var/log/tinyproxy/tinyproxy.log?g" /etc/tinyproxy/tinyproxy.conf |
$SED "s?^LogLevel.*?LogLevel Error?g" /etc/tinyproxy/tinyproxy.conf # Only errors are logged |
$SED "s?^#Upstream.*?Upstream 127.0.0.1:8090?g" /etc/tinyproxy/tinyproxy.conf # forward to HAVP |
$SED "s?^#DisableViaHeader.*?DisableViaHeader Yes?g" /etc/tinyproxy/tinyproxy.conf # Stealth mode |
|
} # end of tinyproxy |
################################################################################## |
1794,7 → 1813,7 |
WantedBy=multi-user.target |
EOF |
# processes launched at boot time (SYSV) |
for i in havp |
for i in havp tinyproxy |
do |
/sbin/chkconfig --add $i |
done |
2011,7 → 2030,7 |
UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3` |
mode="update" |
fi |
for func in init network ACC CA init_db radius radius_web chilli dansguardian antivirus ulogd nfsen dnsmasq BL cron fail2ban gammu_smsd post_install |
for func in init network ACC CA init_db radius radius_web chilli dansguardian antivirus tinyproxy ulogd nfsen dnsmasq BL cron fail2ban gammu_smsd post_install |
do |
$func |
# echo "*** 'debug' : end of function $func ***"; read a |