wok-current annotate freeradius-dialupadmin/receipt @ rev 8854
Up: cherokee to 1.2.1.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Feb 25 02:47:43 2011 +0000 (2011-02-25) |
parents | 274aa91a3490 |
children | fbdbdc00789a |
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/" |
slaxemulator@8752 | 10 SOURCE="freeradius-server" |
pascal@1348 | 11 WANTED="freeradius" |
pascal@1348 | 12 CONFIG_FILES="/etc/dialupadmin" |
pascal@1348 | 13 |
pascal@1348 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1348 | 15 genpkg_rules() |
pascal@1348 | 16 { |
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 } |