wok-current view freeradius-dialupadmin/receipt @ rev 13027
asterisk, cpuspeed, fcitx-configtool, get-eclipse-pdt, get-sjphone, get-xlite, linphone, wvdial, wvstreams: fix tags
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 11 18:48:18 2012 +0200 (2012-06-11) |
parents | 2ab805d95b3e |
children | 7bb096863642 |
line source
1 # SliTaz package receipt.
3 PACKAGE="freeradius-dialupadmin"
4 VERSION="2.1.12"
5 CATEGORY="network"
6 SHORT_DESC="radius server web interface"
7 MAINTAINER="sdaigl@lacitec.on.ca"
8 DEPENDS="php"
9 WEB_SITE="http://www.freeradius.org/"
10 SOURCE="freeradius-server"
11 WANTED="freeradius"
12 CONFIG_FILES="/etc/dialupadmin"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
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 }