78,16 → 78,17 |
# backup the logo |
cp -f $DIR_WEB/images/organisme.png $DIR_UPDATE |
# backup BL/WL custom files |
cp -f /etc/dansguardian/lists/exceptioniplist $DIR_UPDATE/dansguardian/ |
cp -f /etc/dansguardian/lists/urlregexplist $DIR_UPDATE/dansguardian/ |
cp -f /etc/dansguardian/lists/exceptionsitelist $DIR_UPDATE/dansguardian/ |
cp -f /etc/dansguardian/lists/bannedsitelist $DIR_UPDATE/dansguardian/ |
cp -f /etc/dansguardian/lists/exceptionurllist $DIR_UPDATE/dansguardian/ |
cp -f /etc/dansguardian/lists/bannedurllist $DIR_UPDATE/dansguardian/ |
cp -f $DIR_SHARE/dnsmasq-bl/ossi.conf $DIR_UPDATE/dnsmasq-bl/ossi.conf |
cp -f $DIR_SHARE/dnsmasq-wl/ossi.conf $DIR_UPDATE/dnsmasq-wl/ossi.conf |
cp -f $DIR_SHARE/iptables-bl/ossi $DIR_UPDATE/iptables-bl/ossi |
cp -f $DIR_SHARE/iptables-wl/ossi $DIR_UPDATE/iptables-wl/ossi |
mkdir $DIR_UPDATE/custom_bl |
cp -f /etc/dansguardian/lists/exceptioniplist $DIR_UPDATE/custom_bl/ |
cp -f /etc/dansguardian/lists/urlregexplist $DIR_UPDATE/custom_bl/ |
cp -f /etc/dansguardian/lists/exceptionsitelist $DIR_UPDATE/custom_bl/ |
cp -f /etc/dansguardian/lists/bannedsitelist $DIR_UPDATE/custom_bl/ |
cp -f /etc/dansguardian/lists/exceptionurllist $DIR_UPDATE/custom_bl/ |
cp -f /etc/dansguardian/lists/bannedurllist $DIR_UPDATE/custom_bl/ |
cp -f $DIR_SHARE/dnsmasq-bl/ossi.conf $DIR_UPDATE/custom_bl/ossi-dnsbl.conf |
cp -f $DIR_SHARE/dnsmasq-wl/ossi.conf $DIR_UPDATE/custom_bl/ossi-dnswl.conf |
cp -f $DIR_SHARE/iptables-bl/ossi $DIR_UPDATE/custom_bl/ossi-ipbl |
cp -f $DIR_SHARE/iptables-wl/ossi $DIR_UPDATE/custom_bl/ossi-ipwl |
# backup of different conf files (main conf file, filtering, digest, etc) |
mkdir $DIR_UPDATE/etc/ |
cp -rf $DIR_ETC/* $DIR_UPDATE/etc/ |
125,21 → 126,19 |
chmod -R 750 /etc/pki |
# Import of the users database |
gzip -dc < `ls $DIR_UPDATE/alcasar-users-database*` | mysql -u$DB_USER -p$radiuspwd |
# Retrieve local parameters & |
# !!! for this version (2.9.2) we need to create new digest accounts and Remove blacklist files (now in /usr/local/share) |
# !!! remove the first two lines for future versions |
[ -d $DIR_UPDATE/etc ] && rm -rf $DIR_UPDATE/etc/alcasar-dnsfilter* |
[ -d $DIR_UPDATE/etc ] && rm -f $DIR_UPDATE/etc/digest/* |
|
# Retrieve local parameters |
[ -d $DIR_UPDATE/etc ] && cp -rf $DIR_UPDATE/etc/* $DIR_ETC/ |
# Retrieve Dansguardian files |
cp -f $DIR_UPDATE/exceptioniplist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/exceptionsitelist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/urlregexplist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/bannedsitelist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/exceptionurllist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/bannedurllist /etc/dansguardian/lists/ |
cp -rf $DIR_UPDATE/ossi /etc/dansguardian/lists/blacklists/ |
# Retrieve BL/WL custom files |
cp -f $DIR_UPDATE/custom_bl/exceptioniplist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/custom_bl/exceptionsitelist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/custom_bl/urlregexplist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/custom_bl/bannedsitelist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/custom_bl/exceptionurllist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/custom_bl/bannedurllist /etc/dansguardian/lists/ |
cp -f $DIR_UPDATE/custom_bl/ossi-dnsbl.conf $DIR_SHARE/dnsmasq-bl/ossi.conf |
cp -f $DIR_UPDATE/custom_bl/ossi-dnswl.conf $DIR_SHARE/dnsmasq-wl/ossi.conf |
cp -f $DIR_UPDATE/custom_bl/ossi-ipbl $DIR_SHARE/iptables-bl/ossi |
cp -f $DIR_UPDATE/custom_bl/ossi-ipwl $DIR_SHARE/iptables-wl/ossi |
chown -R dansguardian:apache /etc/dansguardian/lists |
chmod -R g+rw /etc/dansguardian/lists |
# Adapt DNS/URL filtering |
161,13 → 160,6 |
else |
/usr/bin/systemctl -q disable sshd.service |
fi |
# modifications added with this version (2.9.2) |
# add "HOSTNAME=" in alcasar.conf |
hostname_defined=`grep ^HOSTNAME= $CONF_FILE|wc -l` |
if [ $hostname_defined = "0" ] |
then |
$SED "/^DOMAIN=/iHOSTNAME=alcasar" $CONF_FILE |
fi |
# Remove the update folder |
rm -rf $DIR_UPDATE |
;; |