wok-current view freeradius-dialupadmin/receipt @ rev 5592
xorg-libX11 depends on libxcb; add tags to xorg-xf86-video-*; Up trident
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Mon May 17 13:19:39 2010 -0400 (2010-05-17) |
parents | bf9b1734ec69 |
children | a1c1d35d9f92 |
line source
1 # SliTaz package receipt.
3 PACKAGE="freeradius-dialupadmin"
4 VERSION="2.1.3"
5 CATEGORY="network"
6 SHORT_DESC="radius server web interface"
7 MAINTAINER="Serge Daigle sdaigl@lacitec.on.ca"
8 DEPENDS="php"
9 WEB_SITE="http://www.freeradius.org/"
10 WANTED="freeradius"
11 CONFIG_FILES="/etc/dialupadmin"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 src=$(cd ../freeradius/freeradius-server-$VERSION; pwd)
17 mkdir -p $fs/usr/share $fs/etc/dialupadmin
18 cp -a $src/dialup_admin $fs/usr/share
19 cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin
20 rm -rf $fs/usr/share/dialup_admin/conf
21 ln -s /etc/dialupadmin $fs/usr/share/dialup_admin
22 }
24 post_install()
25 {
26 # Configure lighttpd server
27 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
28 if ! grep -q /usr/share/dialup_admin/ $1/etc/lighttpd/lighttpd.conf; then
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
30 if [ -z "$1" ]; then
31 # Start Web server.
32 /etc/init.d/lighttpd stop
33 /etc/init.d/lighttpd start
34 fi
35 fi
36 fi
37 # Configure apache server
38 if [ -f $1/etc/apache/httpd.conf ]; then
39 if [ ! -f $1/etc/apache/conf.d/dialupadmin ]; then
40 cat > $1/etc/apache/conf.d/dialupadmin <<EOT
41 <IfModule mod_alias.c>
42 Alias /dialupadmin /usr/share/dialup_admin/htdocs
43 </IfModule>
44 <DirectoryMatch /usr/share/dialup_admin/htdocs/>
45 DirectoryIndex index.html
46 Options +FollowSymLinks
47 AllowOverride None
48 Order allow,deny
49 Allow from all
50 </DirectoryMatch>
51 EOT
52 if [ -z "$1" ]; then
53 # Start Web server.
54 /etc/init.d/apache stop
55 /etc/init.d/apache start
56 fi
57 fi
58 fi
59 }