| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| t_Log "Running $0 - installation and startup of freeradius." |
| |
| if [ $centos_ver -gt 5 ] |
| then |
| |
| t_InstallPackage freeradius freeradius-utils |
| else |
| |
| t_InstallPackage freeradius2 freeradius2-utils |
| fi |
| |
| |
| if [ $centos_ver -gt 5 ] |
| then |
| t_ServiceControl radiusd start |
| else |
| |
| |
| |
| if [ ! -e /etc/raddb/radiusd.conf.orig ] |
| then |
| |
| /bin/cp -a /etc/raddb/radiusd.conf /etc/raddb/radiusd.conf.orig |
| grep -iv eap /etc/raddb/radiusd.conf.orig > /etc/raddb/radiusd.conf |
| fi |
| rm -rf /etc/raddb/sites-enabled/control-socket |
| rm -rf /etc/raddb/sites-enabled/inner-tunnel |
| |
| |
| if [ ! -e /etc/raddb/sites-available/default.orig ] |
| then |
| |
| /bin/cp -a /etc/raddb/sites-available/default /etc/raddb/sites-available/default.orig |
| fi |
| cat > /etc/raddb/sites-available/default <<EOF |
| authorize { |
| files |
| } |
| authenticate { |
| } |
| EOF |
| fi |
| |