wok-stable rev 1348
Add freeradius-dialupadmin
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 05 14:32:17 2008 +0000 (2008-09-05) |
parents | 2ff9c727c0ee |
children | a65b8677018a |
files | freeradius-dialupadmin/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/freeradius-dialupadmin/receipt Fri Sep 05 14:32:17 2008 +0000 1.3 @@ -0,0 +1,68 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="freeradius-dialupadmin" 1.7 +VERSION="2.0.5" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="radius server web interface" 1.10 +MAINTAINER="Serge Daigle sdaigl@lacitec.on.ca" 1.11 +DEPENDS="php" 1.12 +WEB_SITE="http://www.freeradius.org/" 1.13 +WANTED="freeradius" 1.14 +CONFIG_FILES="/etc/dialupadmin" 1.15 + 1.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.17 +genpkg_rules() 1.18 +{ 1.19 + src=$(cd ../freeradius/freeradius-server-$VERSION; pwd) 1.20 + mkdir -p $fs/usr/share $fs/etc/dialupadmin 1.21 + cp -a $src/dialup_admin $fs/usr/share 1.22 + cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin 1.23 + rm -rf $fs/usr/share/dialup_admin/conf 1.24 + ln -s /etc/dialupadmin $fs/usr/share/dialup_admin 1.25 +} 1.26 + 1.27 +post_install() 1.28 +{ 1.29 + ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ 1.30 + $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT 1.31 +etc/dialupadmin 1.32 +EOT 1.33 + # Configure lighttpd server 1.34 + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 1.35 + if ! grep -q /usr/share/dialup_admin/ $1/etc/lighttpd/lighttpd.conf; then 1.36 + sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/dialupadmin/" => "/usr/share/dialup_admin/htdocs/",|g' -i $1/etc/lighttpd/lighttpd.conf 1.37 + if [ -z "$1" ]; then 1.38 + # Start Web server. 1.39 + /etc/init.d/lighttpd stop 1.40 + /etc/init.d/lighttpd start 1.41 + fi 1.42 + fi 1.43 + fi 1.44 + # Configure apache server 1.45 + if [ -f $1/etc/apache/httpd.conf ]; then 1.46 + if [ ! -f $1/etc/apache/conf.d/phpldapadmin ]; then 1.47 + cat > $1/etc/apache/conf.d/phpldapadmin <<EOT 1.48 +<IfModule mod_alias.c> 1.49 + Alias /dialupadmin /usr/share/dialup_admin/htdocs 1.50 +</IfModule> 1.51 +<DirectoryMatch /usr/share/dialup_admin/htdocs/> 1.52 + DirectoryIndex index.php 1.53 + Options +FollowSymLinks 1.54 + AllowOverride None 1.55 + Order allow,deny 1.56 + Allow from all 1.57 +</DirectoryMatch> 1.58 +EOT 1.59 + if [ -z "$1" ]; then 1.60 + # Start Web server. 1.61 + /etc/init.d/apache stop 1.62 + /etc/init.d/apache start 1.63 + fi 1.64 + fi 1.65 + fi 1.66 +} 1.67 + 1.68 +repack_cleanup() 1.69 +{ 1.70 + zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) 1.71 +}