wok-next annotate freeradius-dialupadmin/receipt @ rev 15147

jed: filter wrong error trigger
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 15 13:01:55 2013 +0000 (2013-08-15)
parents 2ab805d95b3e
children 7bb096863642
rev   line source
pascal@1348 1 # SliTaz package receipt.
pascal@1348 2
pascal@1348 3 PACKAGE="freeradius-dialupadmin"
pascal@12433 4 VERSION="2.1.12"
pascal@1348 5 CATEGORY="network"
pascal@1348 6 SHORT_DESC="radius server web interface"
pascal@13027 7 MAINTAINER="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 }