/alcasar.sh |
---|
810,8 → 810,6 |
{ |
# 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 |
866,6 → 864,14 |
$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 () |
########################################################## |
970,7 → 976,7 |
userdel -r havp 2>/dev/null |
fi |
groupadd -f havp |
useradd -M -g havp havp |
useradd -r -g havp -s /bin/false -c "system user for 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 |
1336,7 → 1342,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 mysqld dansguardian havp freshclam |
for i in ntpd iptables ulogd dnsmasq squid chilli httpd radiusd netfs mysqld dansguardian havp freshclam |
do |
/sbin/chkconfig --add $i |
done |
/conf/rpms/coova-chilli-1.2.9.spec |
---|
0,0 → 1,125 |
%define _disable_ld_no_undefined 1 |
Summary: Coova-Chilli is a LAN Access Point Controller |
Name: coova-chilli |
Version: 1.2.9 |
Release: %mkrel 0 |
URL: http://coova.org/wiki/index.php/CoovaChilli |
Source0: http://ap.coova.org/chilli/%{name}-%{version}.tar.gz |
License: GPLv2 |
Group: System/Servers |
Packager: Rexy for ALCASAR project |
Requires(pre): rpm-helper |
Requires(postun): rpm-helper |
BuildRequires: autoconf |
BuildRequires: libtool |
BuildRequires: curl-devel |
BuildRequires: pcap-devel |
BuildRequires: python |
BuildRequires: python-devel |
%if %{!?_without_ssl:1}0 |
BuildRequires: openssl-devel |
%endif |
Provides: coova-chilli = %{version}-%{release} |
Obsoletes: chillispot |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
%description |
Coova-Chilli is a fork of the ChilliSpot project - an open source captive |
portal or wireless LAN access point controller. It supports web based login |
(Universal Access Method, or UAM), standard for public HotSpots, and it |
supports Wireless Protected Access (WPA), the standard for secure roamable |
networks. Authentication, Authorization and Accounting (AAA) is handled by |
your favorite radius server. Read more at http://coova.org/. |
%prep |
%setup -q -n %{name}-%{version} |
%build |
%configure \ |
--disable-static \ |
--enable-shared \ |
--enable-largelimits \ |
--enable-miniportal \ |
--enable-chilliredir \ |
--enable-chilliproxy \ |
--enable-chilliscript \ |
--with-poll \ |
%if %{!?_without_ssl:1}0 |
--with-openssl \ |
--enable-chilliradsec \ |
%endif |
make |
%install |
make install DESTDIR=$RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT/usr/include/* |
rm -rf $RPM_BUILD_ROOT/usr/lib/*.la |
rm -rf $RPM_BUILD_ROOT/usr/lib/*.a |
%clean |
rm -rf $RPM_BUILD_ROOT |
make clean |
%post |
%_post_service chilli |
%preun |
%_preun_service chilli |
%files |
%defattr(-,root,root) |
%{_sbindir}/* |
%{_libdir}/*.so* |
%{_libdir}/python/CoovaChilliLib.py |
%{_sysconfdir}/init.d/chilli |
%doc AUTHORS COPYING ChangeLog INSTALL README doc/dictionary.chillispot doc/hotspotlogin.cgi |
%config %{_sysconfdir}/chilli.conf |
%config %{_sysconfdir}/chilli/gui-config-default.ini |
%config(noreplace) %{_sysconfdir}/chilli/defaults |
%dir %{_sysconfdir}/chilli |
%dir %{_sysconfdir}/chilli/www |
%attr(755,root,root)%{_sysconfdir}/chilli/www/config.sh |
%attr(4750,root,chilli)%{_sbindir}/chilli_script |
%{_sysconfdir}/chilli/www/* |
%{_sysconfdir}/chilli/wwwsh |
%{_sysconfdir}/chilli/functions |
%{_sysconfdir}/chilli/*.sh |
%{_mandir}/man1/*.1* |
%{_mandir}/man5/*.5* |
%{_mandir}/man8/*.8* |
%changelog |
* Wed Jan 18 2012 Rexy for ALCASAR project |
- 1.2.9 release |
* Sun Jul 11 2011 Rexy for ALCASAR project |
- 1.2.8 release |
* Sat Feb 12 2011 Rexy for Alcasar project |
+ revision: 433 |
+ add _disable_ld_no_undefined 1 |
- 1.2.6 release |
* Sat Nov 20 2010 Rexy for Alcasar project |
+ revision: 394 |
- 1.2.5 release |
* Sat Jan 2 2010 <david@coova.com> |
- 1.2.0 release |
* Thu Sep 30 2007 <david@coova.com> |
- 1.0.8 release |
* Thu Aug 20 2007 <david@coova.com> |
- 1.0-coova.7 release |
* Thu Jun 7 2007 <david@coova.com> |
- 1.0-coova.6 release |
* Wed May 16 2007 <david@coova.com> |
- 1.0-coova.5 release |
* Wed Feb 07 2007 <david@coova.com> |
- 1.0-coova.4 release |
* Wed Nov 15 2006 <david@coova.com> |
- 1.0-coova.3 release |
* Thu Mar 25 2004 <support@chillispot.org> |
- Initial release. |
/scripts/sbin/alcasar-uninstall.sh |
---|
112,12 → 112,12 |
sleep 1 |
#antivirus |
echo -en "\n- antivirus(3) : " |
echo -en "\n- antivirus(2) : " |
if [ -e /etc/init.d/havp ] |
then |
[ `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" |
[ -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) |
else echo -n "uninstalled" |
fi |
sleep 1 |
138,13 → 138,13 |
sleep 1 |
#DnsMasq |
echo -en "\n- dnsmasq(3) : " |
echo -en "\n- dnsmasq(4) : " |
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,16 → 169,18 |
sleep 1 |
#cron |
echo -en "\n- cron(9) : " |
echo -en "\n- croni(10) : " |
[ -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/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" |
[ -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 |
sleep 1 |
# network |
192,7 → 194,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 |
200,7 → 202,7 |
sleep 1 |
#post_install |
echo -en "\n- post_install(10) : " |
echo -en "\n- post_install(11) : " |
[ -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, " |
210,7 → 212,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 |
221,4 → 223,4 |
rm -rf $rm_fic/alcasar* |
done |
echo |
read a |
/scripts/sbin/alcasar-bypass.sh |
---|
29,6 → 29,7 |
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 ..." |
44,7 → 45,8 |
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 |
for i in chilli squid dansguardian havp mysqld radiusd httpd freshclam dnsmasq |
rm -f /etc/sysconfig/network-scripts/ifcfg-eth1 |
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 |