Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2588 → Rev 2590

/alcasar.sh
1497,11 → 1497,12
vnstat ()
{
[ -e /etc/vnstat.conf.default ] || cp /etc/vnstat.conf /etc/vnstat.conf.default
$SED "s?Interface.*?Interface \"$EXTIF\"?g" /etc/vnstat.conf
$SED "s?^Interface.*?Interface \"$EXTIF\"?g" /etc/vnstat.conf
$SED "s?^DatabaseDir.*?DatabaseDir /var/log/vnstat?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');?" $DIR_ACC/manager/stats/config.php
$SED "s?\$iface_title\['.*?\$iface_title\['$EXTIF'\] = \$title;?" $DIR_ACC/manager/stats/config.php
/usr/bin/vnstat -u -i $EXTIF
/usr/bin/vnstat -i $EXTIF -u --force
} # End of vnstat
 
##################################################################