wok view freeradius-dialupadmin/receipt @ rev 20610
Up linux-libre (3.18.129) again
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Dec 18 11:03:26 2018 +0100 (2018-12-18) |
parents | 7bb096863642 |
children | faf06d0e5299 |
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 LICENSE="GPL2 LGPL2"
9 WEB_SITE="http://www.freeradius.org/"
10 SOURCE="freeradius-server"
11 WANTED="freeradius"
12 CONFIG_FILES="/etc/dialupadmin"
14 DEPENDS="php"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 mkdir -p $fs/usr/share $fs/etc/dialupadmin
20 cp -a $src/dialup_admin $fs/usr/share
21 cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin
22 rm -rf $fs/usr/share/dialup_admin/conf
23 ln -s /etc/dialupadmin $fs/usr/share/dialup_admin
24 }
26 post_install()
27 {
28 # Configure lighttpd server
29 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
30 if ! grep -q /usr/share/dialup_admin/ "$1/etc/lighttpd/lighttpd.conf"; then
31 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"
32 if [ -z "$1" ]; then
33 # Start Web server.
34 /etc/init.d/lighttpd stop
35 /etc/init.d/lighttpd start
36 fi
37 fi
38 fi
39 # Configure apache server
40 if [ -f "$1/etc/apache/httpd.conf" ]; then
41 if [ ! -f "$1/etc/apache/conf.d/dialupadmin" ]; then
42 cat > "$1/etc/apache/conf.d/dialupadmin" <<EOT
43 <IfModule mod_alias.c>
44 Alias /dialupadmin /usr/share/dialup_admin/htdocs
45 </IfModule>
46 <DirectoryMatch /usr/share/dialup_admin/htdocs/>
47 DirectoryIndex index.html
48 Options +FollowSymLinks
49 AllowOverride None
50 Order allow,deny
51 Allow from all
52 </DirectoryMatch>
53 EOT
54 if [ -z "$1" ]; then
55 # Start Web server.
56 /etc/init.d/apache stop
57 /etc/init.d/apache start
58 fi
59 fi
60 fi
61 }