[arch-commits] Commit in lighttpd/trunk (PKGBUILD lighttpd.rc.d)
Pierre Schmitz
pierre at archlinux.org
Sat Apr 9 11:33:07 UTC 2011
Date: Saturday, April 9, 2011 @ 07:33:06
Author: pierre
Revision: 118904
Create pid directory if it does not exist: see FS#18157
Modified:
lighttpd/trunk/PKGBUILD
lighttpd/trunk/lighttpd.rc.d
---------------+
PKGBUILD | 11 ++++++++---
lighttpd.rc.d | 15 ++++++---------
2 files changed, 14 insertions(+), 12 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-04-09 10:33:03 UTC (rev 118903)
+++ PKGBUILD 2011-04-09 11:33:06 UTC (rev 118904)
@@ -3,7 +3,7 @@
pkgname=lighttpd
pkgver=1.4.28
-pkgrel=4
+pkgrel=5
pkgdesc='a secure, fast, compliant and very flexible web-server'
license=('custom')
arch=('i686' 'x86_64')
@@ -19,7 +19,7 @@
source=("http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${pkgver}.tar.bz2"
'lighttpd.rc.d' 'lighttpd.logrotate.d' 'lighttpd.conf')
md5sums=('586eb535d31ac299652495b058dd87c4'
- 'f110637c56d360ecaecb3bf6f7918229'
+ 'eadffcda24d0d996032f8555ce9623c2'
'913e2157fa78d990c32146f387d44c2b'
'2803a9ee7f20409c69f1566d2d90720e')
@@ -43,6 +43,11 @@
make
}
+check() {
+ cd $srcdir/$pkgname-$pkgver
+ make check
+}
+
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir install
@@ -50,7 +55,7 @@
install -D -m755 $srcdir/lighttpd.rc.d $pkgdir/etc/rc.d/lighttpd
install -D -m644 $srcdir/lighttpd.logrotate.d $pkgdir/etc/logrotate.d/lighttpd
install -D -m644 $srcdir/lighttpd.conf $pkgdir/etc/lighttpd/lighttpd.conf
- install -d -m755 -o http -g http $pkgdir/var/{run,log,cache}/lighttpd/
+ install -d -m755 -o http -g http $pkgdir/var/{log,cache}/lighttpd/
pushd doc/config >/dev/null
find . -type f ! -name 'Makefile*' -exec install -D -m644 {} ${pkgdir}/usr/share/doc/lighttpd/config/{} \;
Modified: lighttpd.rc.d
===================================================================
--- lighttpd.rc.d 2011-04-09 10:33:03 UTC (rev 118903)
+++ lighttpd.rc.d 2011-04-09 11:33:06 UTC (rev 118904)
@@ -5,7 +5,7 @@
get_pid_file() {
- /usr/sbin/lighttpd -p -f /etc/lighttpd/lighttpd.conf 2>/dev/null | grep server.pid-file | cut -d= -f2
+ /usr/sbin/lighttpd -p -f /etc/lighttpd/lighttpd.conf 2>/dev/null | grep server.pid-file | sed -E 's/.*"(.+)"/\1/'
}
get_pid() {
@@ -37,20 +37,17 @@
stat_die
fi
- local d
- for d in /var/{run,log,cache}/lighttpd; do
- if [ ! -d $d ]; then
- stat_append "(directory $d not found)"
- stat_die
- fi
- done
-
/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf >/dev/null 2>&1
if [ $? -gt 0 ]; then
stat_append '(error in /etc/lighttpd/lighttpd.conf)'
stat_die
fi
+ local piddir=$(dirname "$(get_pid_file)")
+ if [ ! -d "{$piddir}" ]; then
+ install -d -m755 -o http -g http "${piddir}"
+ fi
+
stat_done
}
More information about the arch-commits
mailing list