Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 796 → Rev 795

/conf/rpms/coova-chilli-1.2.9.spec
File deleted
/alcasar.sh
810,6 → 810,8
{
# modification du fichier d'initialisation
[ -e /etc/init.d/chilli.default ] || cp /etc/init.d/chilli /etc/init.d/chilli.default
# configuration d'eth1 (utile pour dnsmasq))
$SED "s?ifconfig.*?ifconfig \$HS_LANIF $PRIVATE_IP?g" /etc/init.d/chilli
# ajout de la fonction 'status' (utile pour la gestion du process)
$SED "/^.*functions/i. /etc/init.d/functions" /etc/init.d/chilli
$SED "/^[\t ]*stop)/i\ status)\n status chilli\n RETVAL=$?\n ;;\n" /etc/init.d/chilli
864,14 → 866,6
$SED "s?^\$uamsecret =.*?\$uamsecret = \"$secretuam\";?g" $DIR_WEB/intercept.php
$SED "s?^\$userpassword=1.*?\$userpassword=1;?g" $DIR_WEB/intercept.php
$SED "s?^\$organisme = .*?\$organisme = \"$ORGANISME\";?g" $DIR_WEB/intercept.php $DIR_WEB/status.php
# user 'chilli' creation (in order to run conup/off and up/down scripts
chilli_exist=`grep chilli /etc/passwd|wc -l`
if [ "$chilli_exist" == "1" ]
then
userdel -r chilli 2>/dev/null
fi
groupadd -f chilli
useradd -r -g chilli -s /bin/false -c "system user for coova-chilli" chilli
} # End of param_chilli ()
 
##########################################################
976,7 → 970,7
userdel -r havp 2>/dev/null
fi
groupadd -f havp
useradd -r -g havp -s /bin/false -c "system user for havp" havp
useradd -M -g havp havp
mkdir -p /var/tmp/havp /var/log/havp
chown -R havp /var/tmp/havp /var/log/havp /var/run/havp
$SED "/$HAVP_BIN -c $HAVP_CONFIG/i chown -R havp:havp \/var\/tmp\/havp" /etc/init.d/havp
1342,7 → 1336,7
# export des logs en 'retard' dans /var/Save/logs
/usr/local/bin/alcasar-log-export.sh
# processus lancés par défaut au démarrage
for i in ntpd iptables ulogd dnsmasq squid chilli httpd radiusd netfs mysqld dansguardian havp freshclam
for i in ntpd iptables ulogd dnsmasq squid chilli httpd radiusd mysqld dansguardian havp freshclam
do
/sbin/chkconfig --add $i
done
/scripts/sbin/alcasar-uninstall.sh
112,12 → 112,12
sleep 1
 
#antivirus
echo -en "\n- antivirus(2) : "
echo -en "\n- antivirus(3) : "
if [ -e /etc/init.d/havp ]
then
[ -e /etc/havp/havp.config.default ] && mv /etc/havp/havp.config.default /etc/havp/havp.config && echo -n "1, "
userdel -r havp 2>/dev/null && echo -n "2"
[ `grep havp /etc/fstab|wc -l` -ne "0" ] && $SED "/havp/d" /etc/fstab # anciennes versions (mémoire tampon sur disque)
[ `grep havp /etc/fstab|wc -l` -ne "0" ] && $SED "/havp/d" /etc/fstab && echo -n "1, "
[ -e /etc/havp/havp.config.default ] && mv /etc/havp/havp.config.default /etc/havp/havp.config && echo -n "2, "
userdel -r havp 2>/dev/null && echo -n "3"
else echo -n "uninstalled"
fi
sleep 1
138,13 → 138,13
sleep 1
 
#DnsMasq
echo -en "\n- dnsmasq(4) : "
echo -en "\n- dnsmasq(3) : "
if [ -e /etc/init.d/dnsmasq ]
then
[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "1, "
[ -e /etc/dnsmasq-blackhole.conf ] && rm -f /etc/dnsmasq-blackhole.conf && echo -n "2, "
[ -d /etc/dnsmasq.d ] && rm -rf /etc/dnsmasq.d
[ -e /etc/init.d/dnsmasq.default ] && mv /etc/init.d/dnsmasq.default /etc/init.d/dnsmasq && echo -n "3, "
[ -e /etc/init.d/dnsmasq.default ] && mv /etc/init.d/dnsmasq.default /etc/init.d/dnsmasq && echo -n "3"
[ -e /etc/sysconfig/dnsmasq.default ] && mv /etc/sysconfig/dnsmasq.default /etc/sysconfig/dnsmasq && echo -n "4"
else echo -n "uninstalled"
fi
169,18 → 169,16
sleep 1
 
#cron
echo -en "\n- croni(10) : "
echo -en "\n- cron(9) : "
[ -e /etc/crontab.default ] && mv /etc/crontab.default /etc/crontab && echo -n "1, "
[ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "2, "
[ -e /etc/cron.d/alcasar-mysql ] && rm -f /etc/cron.d/alcasar-mysql && echo -n "3, "
[ -e /etc/cron.d/alcasar-export_log ] && rm -f /etc/cron.d/alcasar-export_log && echo -n "4, "
[ -e /etc/cron.d/alcasar-clean_log ] && rm -f /etc/cron.d/alcasar-clean_log && echo -n "5, "
[ -e /etc/cron.d/alcasar-clean_import ] && rm -f /etc/cron.d/alcasar-clean_import && echo -n "6, "
[ -e /etc/cron.d/alcasar-distrib-updates ] && rm -f /etc/cron.d/alcasar-distrib-updates && echo -n "7, "
[ -e /etc/cron.d/awstats ] && rm -f /etc/cron.d/awstats && echo -n "8, "
[ -e /etc/cron.d/freeradius-web ] && rm -f /etc/cron.d/freeradius-web && echo -n "9, "
[ -e /etc/cron.d/alcasar-watchdog ] && rm -f /etc/cron.d/alcasar-watchdog && echo -n "10"
rm -f /etc/cron.d/coova /etc/cron.d/alcasar-bl_download
[ -e /etc/cron.d/mysql ] && rm -f /etc/cron.d/mysql && echo -n "3, "
[ -e /etc/cron.d/export_log ] && rm -f /etc/cron.d/export_log && echo -n "4, "
[ -e /etc/cron.d/clean_log ] && rm -f /etc/cron.d/clean_log && echo -n "5, "
[ -e /etc/cron.d/awstats ] && rm -f /etc/cron.d/awstats && echo -n "6, "
[ -e /etc/cron.d/freeradius-web ] && rm -f /etc/cron.d/freeradius-web && echo -n "7, "
[ -e /etc/cron.d/coova ] && rm -f /etc/cron.d/coova && echo -n "8, "
[ -e /etc/cron.d/watchdog ] && rm -f /etc/cron.d/watchdog && echo -n "9"
sleep 1
 
# network
194,7 → 192,7
[ -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, "
[ -e /etc/sysconfig/iptables ] && rm -f /etc/sysconfig/iptables && echo -n "8, "
[ -e /etc/sysconfig/iptables ] && rm -f /etc/sysconfig/iptables && echo -n "8"
[ -e /etc/modprobe.preload.default ] && mv /etc/modprobe.preload.default /etc/modprobe.preload && echo -n "9"
 
echo
202,7 → 200,7
sleep 1
 
#post_install
echo -en "\n- post_install(11) : "
echo -en "\n- post_install(10) : "
[ -e /etc/mandriva-release.default ] && mv /etc/mandriva-release.default /etc/mandriva-release && echo -n "1, "
[ -e /etc/ssh/alcasar-banner-ssh ] && rm -f /etc/ssh/alcasar-banner-ssh && echo -n "2, "
[ -e /etc/ssh/sshd_config.default ] && mv /etc/ssh/sshd_config.default /etc/ssh/sshd_config && echo -n "3, "
212,7 → 210,7
[ -e /etc/logrotate.d/httpd ] && rm -f /etc/logrotate.d/httpd && echo -n "7, "
[ -e /etc/logrotate.d/squid ] && rm -f /etc/logrotate.d/squid && echo -n "8, "
[ -e /etc/logrotate.d/radiusd ] && rm -f /etc/logrotate.d/radiusd && echo -n "9, "
[ -e /etc/logrotate.d/ulogd ] && rm -f /etc/logrotate.d/ulogd && echo -n "10, "
[ -e /etc/logrotate.d/ulogd ] && rm -f /etc/logrotate.d/ulogd && echo -n "10"
[ -e /etc/logrotate.d/dnsmasq ] && rm -f /etc/logrotate.d/dnsmasq && echo -n "11"
sleep 1
 
223,4 → 221,4
rm -rf $rm_fic/alcasar*
done
echo
read a
 
/scripts/sbin/alcasar-bypass.sh
29,7 → 29,6
if (pgrep $i) > /dev/null ; then /etc/init.d/$i stop ; fi
done
echo "Configure eth1 ..."
cp /etc/sysconfig/network-scripts/default-ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1
ifup eth1
sh /usr/local/bin/alcasar-iptables-bypass.sh
echo "Configure dnsmasq ..."
45,8 → 44,7
echo "Configure dnsmasq ..."
$SED "s?^#conf-dir=.*?conf-dir=/usr/local/etc/alcasar-dnsfilter-enabled?g" /etc/dnsmasq-blackhole.conf
$SED "s?^#no-dhcp-interface=.*?no-dhcp-interface=eth1?g" /etc/dnsmasq.conf /etc/dnsmasq-blackhole.conf
rm -f /etc/sysconfig/network-scripts/ifcfg-eth1
for i in chilli squid dansguardian havp mysqld radiusd httpd freshclam dnsmasq
for i in chilli squid dansguardian havp mysqld radiusd httpd freshclam dnsmasq
do
if ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
done