Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1540 → Rev 1541

/alcasar.sh
41,6 → 41,7
# ulogd : log system in userland (match NFLOG target of iptables)
# nfsen : : Configuration du grapheur nfsen pour apache
# dnsmasq : Name server configuration
# vnstat : little network stat daemon
# BL : BlackList of Toulouse configuration : split into 3 BL (for Dnsmasq, for dansguardian and for Netfilter)
# cron : Logs export + watchdog + connexion statistics
# fail2ban : Fail2ban IDS installation and configuration
832,13 → 833,6
EOF
# Launch after coova
$SED "s?^After=.*?After=network.target remote-fs.target nss-lookup.target chilli.service?g" /lib/systemd/system/httpd.service
# Initialization of Vnstat and vnstat phpFE
[ -e /etc/vnstat.conf.default ] || cp /etc/vnstat.conf /etc/vnstat.conf.default
$SED "s?Interface.*?Interface \"$EXTIF\"?g" /etc/vnstat.conf
[ -e /var/www/html/acc/manager/stats/config.php.default ] || cp /var/www/html/acc/manager/stats/config.php /var/www/html/acc/manager/stats/config.php.default
$SED "s?\$iface_list =.*?\$iface_list = array('$EXTIF');?g" /var/www/html/acc/manager/stats/config.php
$SED "s?\$iface_title.*?\$iface_title['$EXTIF'] = 'Internet outbound';?g" /var/www/html/acc/manager/stats/config.php
/usr/bin/vnstat -u -i $EXTIF
} # End of ACC ()
 
##########################################################################################
1461,6 → 1455,19
} # End of nfsen ()
 
##################################################
## Function "vnstat" ##
## Initialization of Vnstat and vnstat phpFE ##
##################################################
vnstat ()
{
[ -e /etc/vnstat.conf.default ] || cp /etc/vnstat.conf /etc/vnstat.conf.default
$SED "s?Interface.*?Interface \"$EXTIF\"?g" /etc/vnstat.conf
[ -e $DIR_ACC/manager/stats/config.php.default ] || cp $DIR_ACC/manager/stats/config.php $DIR_ACC/manager/stats/config.php.default
$SED "s?\$iface_list =.*?\$iface_list = array('$EXTIF');?g" $DIR_ACC/manager/stats/config.php
$SED "s?\$iface_title.*?\$iface_title['$EXTIF'] = 'Internet outbound';?g" $DIR_ACC/manager/stats/config.php
/usr/bin/vnstat -u -i $EXTIF
} # End of vnstat
##################################################
## Function "dnsmasq" ##
##################################################
dnsmasq ()
2081,7 → 2088,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 tinyproxy 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 vnstat dnsmasq BL cron fail2ban gammu_smsd post_install
do
$func
# echo "*** 'debug' : end of function $func ***"; read a