Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1361 → Rev 1362

/scripts/sbin/alcasar-bl.sh
143,14 → 143,9
;;
# Adapt Toulouse BL to ALCASAR architecture (dnsmasq + DG + iptables)
-adapt | --adapt)
echo -n "Toulouse BlackList migration process. Please wait : "
echo -n "TMigration process of Toulouse BlackList. Please wait : "
# Saving IP ossi category if exist else create it (ie : during the installaton process)
if [ ! -f $DIR_IP_BL/ossi ]
then
touch $DIR_IP_BL/ossi
chown dansguardian:apache $DIR_IP_BL/ossi
fi
mv -f $DIR_IP_BL/ossi $DIR_tmp/ossi-ip
[ -e $DIR_IP_BL/ossi ] && mv -f $DIR_IP_BL/ossi $DIR_tmp/ossi-ip
if [ -f $DIR_tmp/blacklists.tar.gz ]
then
[ -d $DIR_DG_BL/ossi ] && mv -f $DIR_DG_BL/ossi $DIR_tmp
224,7 → 219,7
done
rm -f $FILE_tmp $FILE_ip_tmp
# Restoring ossi-IP category
mv $DIR_tmp/ossi-ip $DIR_IP_BL/ossi
[ -e $DIR_tmp/ossi-ip ] && mv $DIR_tmp/ossi-ip $DIR_IP_BL/ossi
rm -rf $DIR_tmp
echo
;;
/scripts/sbin/alcasar-uninstall.sh
152,6 → 152,7
[ -e /etc/dnsmasq-whitelist.conf ] && rm /etc/dnsmasq-whitelist.conf && echo -n "4, "
[ -e /lib/systemd/system/dnsmasq-blacklist.service ] && rm /lib/systemd/system/dnsmasq-blacklist.service && echo -n "5, "
[ -e /lib/systemd/system/dnsmasq-whitelist.service ] && rm /lib/systemd/system/dnsmasq-whitelist.service && echo -n "6"
else echo -n "uninstalled"
fi
sleep 1
184,11 → 185,14
# network
echo -en "\n- network(9) : "
hostname localhost
/sbin/ifdown eth0
[ -e /etc/sysconfig/network-scripts/default-ifcfg-eth0 ] && mv /etc/sysconfig/network-scripts/default-ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0 && echo -n "1, "
[ -e /etc/sysconfig/network.default ] && mv /etc/sysconfig/network.default /etc/sysconfig/network && echo -n "2, "
[ -e /etc/hosts.default ] && mv /etc/hosts.default /etc/hosts && echo -n "3, "
[ -e /etc/sysconfig/network-scripts/ifcfg-eth1 ] && rm -f /etc/sysconfig/network-scripts/ifcfg-eth1 && echo -n "4, "
for i in /etc/sysconfig/network-scripts/default*
do
nic=`echo $i|cut -d"-" -f4`
/sbin/ifdown $nic
mv -f $i /etc/sysconfig/network-scripts/ifcfg-$nic
done
[ -e /etc/sysconfig/network.default ] && mv /etc/sysconfig/network.default /etc/sysconfig/network && echo -n "3, "
[ -e /etc/hosts.default ] && mv /etc/hosts.default /etc/hosts && echo -n "4, "
[ -e /etc/ntp.conf.default ] && mv /etc/ntp.conf.default /etc/ntp.conf && echo -n "5, "
[ -e /etc/hosts.allow.default ] && mv /etc/hosts.allow.default /etc/hosts.allow && echo -n "6, "
[ -e /etc/hosts.deny.default ] && mv /etc/hosts.deny.default /etc/hosts.deny && echo -n "7, "