wok-current annotate freeradius-dialupadmin/receipt @ rev 4345
syslinux: ifmem.c32 accepts unit K, M, G
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Oct 02 11:37:50 2009 +0200 (2009-10-02) |
parents | bf9b1734ec69 |
children | a1c1d35d9f92 |
rev | line source |
---|---|
pascal@1348 | 1 # SliTaz package receipt. |
pascal@1348 | 2 |
pascal@1348 | 3 PACKAGE="freeradius-dialupadmin" |
pascal@2551 | 4 VERSION="2.1.3" |
pascal@1348 | 5 CATEGORY="network" |
pascal@1348 | 6 SHORT_DESC="radius server web interface" |
pascal@1348 | 7 MAINTAINER="Serge Daigle sdaigl@lacitec.on.ca" |
pascal@1348 | 8 DEPENDS="php" |
pascal@1348 | 9 WEB_SITE="http://www.freeradius.org/" |
pascal@1348 | 10 WANTED="freeradius" |
pascal@1348 | 11 CONFIG_FILES="/etc/dialupadmin" |
pascal@1348 | 12 |
pascal@1348 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1348 | 14 genpkg_rules() |
pascal@1348 | 15 { |
pascal@1348 | 16 src=$(cd ../freeradius/freeradius-server-$VERSION; pwd) |
pascal@1348 | 17 mkdir -p $fs/usr/share $fs/etc/dialupadmin |
pascal@1348 | 18 cp -a $src/dialup_admin $fs/usr/share |
pascal@1348 | 19 cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin |
pascal@1348 | 20 rm -rf $fs/usr/share/dialup_admin/conf |
pascal@1348 | 21 ln -s /etc/dialupadmin $fs/usr/share/dialup_admin |
pascal@1348 | 22 } |
pascal@1348 | 23 |
pascal@1348 | 24 post_install() |
pascal@1348 | 25 { |
pascal@1348 | 26 # Configure lighttpd server |
pascal@1348 | 27 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1348 | 28 if ! grep -q /usr/share/dialup_admin/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@1348 | 29 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 |
pascal@1348 | 30 if [ -z "$1" ]; then |
pascal@1348 | 31 # Start Web server. |
pascal@1348 | 32 /etc/init.d/lighttpd stop |
pascal@1348 | 33 /etc/init.d/lighttpd start |
pascal@1348 | 34 fi |
pascal@1348 | 35 fi |
pascal@1348 | 36 fi |
pascal@1348 | 37 # Configure apache server |
pascal@1348 | 38 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@1981 | 39 if [ ! -f $1/etc/apache/conf.d/dialupadmin ]; then |
pascal@1981 | 40 cat > $1/etc/apache/conf.d/dialupadmin <<EOT |
pascal@1348 | 41 <IfModule mod_alias.c> |
pascal@1348 | 42 Alias /dialupadmin /usr/share/dialup_admin/htdocs |
pascal@1348 | 43 </IfModule> |
pascal@1348 | 44 <DirectoryMatch /usr/share/dialup_admin/htdocs/> |
pascal@1426 | 45 DirectoryIndex index.html |
pascal@1348 | 46 Options +FollowSymLinks |
pascal@1348 | 47 AllowOverride None |
pascal@1348 | 48 Order allow,deny |
pascal@1348 | 49 Allow from all |
pascal@1348 | 50 </DirectoryMatch> |
pascal@1348 | 51 EOT |
pascal@1348 | 52 if [ -z "$1" ]; then |
pascal@1348 | 53 # Start Web server. |
pascal@1348 | 54 /etc/init.d/apache stop |
pascal@1348 | 55 /etc/init.d/apache start |
pascal@1348 | 56 fi |
pascal@1348 | 57 fi |
pascal@1348 | 58 fi |
pascal@1348 | 59 } |