[arch-commits] Commit in lighttpd/repos (3 files)
Pierre Schmitz
pierre at archlinux.org
Sat Mar 21 11:23:28 UTC 2009
Date: Saturday, March 21, 2009 @ 07:23:28
Author: pierre
Revision: 30693
Merged revisions 30692 via svnmerge from
svn+ssh://svn.archlinux.org/srv/svn-packages/lighttpd/trunk
........
r30692 | pierre | 2009-03-21 12:22:56 +0100 (Sa, 21 M?\195?\164r 2009) | 2 lines
upgpkg: lighttpd 1.4.22-2
use new rc-script.proto
........
Modified:
lighttpd/repos/extra-x86_64/ (properties)
lighttpd/repos/extra-x86_64/PKGBUILD
lighttpd/repos/extra-x86_64/lighttpd.rc.d
---------------+
PKGBUILD | 16 +++++++--------
lighttpd.rc.d | 57 ++++++++++++++++++++++++++++++++++++++++++--------------
2 files changed, 51 insertions(+), 22 deletions(-)
Property changes on: lighttpd/repos/extra-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
- /lighttpd/trunk:1-29502
+ /lighttpd/trunk:1-30692
Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2009-03-21 11:22:56 UTC (rev 30692)
+++ extra-x86_64/PKGBUILD 2009-03-21 11:23:28 UTC (rev 30693)
@@ -3,7 +3,7 @@
pkgname=lighttpd
pkgver=1.4.22
-pkgrel=1
+pkgrel=2
pkgdesc='a secure, fast, compliant and very flexible web-server'
license=('custom')
arch=('i686' 'x86_64')
@@ -23,7 +23,7 @@
'lighttpd.rc.d' 'lighttpd.logrotate.d')
md5sums=('ed4ca3897eadf419c893b03fee53c982'
- 'bd690eee0d9e51857448770a151023b0'
+ '789ed1b4521e72e591e09d5dfb99235a'
'857e174643fd7761a2f0d8431a679f6c')
build() {
@@ -46,12 +46,12 @@
--with-webdav-locks \
--with-gdbm \
--with-memcache \
- --with-lua || return 1
- make || return 1
- make DESTDIR=$pkgdir install || return 1
+ --with-lua
+ make
+ make DESTDIR=$pkgdir install
- install -D -m755 ../lighttpd.rc.d $pkgdir/etc/rc.d/lighttpd
- install -D -m644 ../lighttpd.logrotate.d $pkgdir/etc/logrotate.d/lighttpd
+ 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 -m755 -o http -g http $pkgdir/var/run/lighttpd/
install -d -m755 -o http -g http $pkgdir/var/log/lighttpd/
@@ -64,7 +64,7 @@
-e 's|#server.groupname = "wwwrun"|server.groupname = "http"|' \
-e 's|#server.pid-file = "/var/run/lighttpd.pid"|server.pid-file = "/var/run/lighttpd/lighttpd.pid"|' \
-e 's|/usr/local/bin/php-cgi|/usr/bin/php-cgi|' \
- -i ${pkgdir}/etc/lighttpd/lighttpd.conf || return 1
+ -i ${pkgdir}/etc/lighttpd/lighttpd.conf
install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
}
Modified: extra-x86_64/lighttpd.rc.d
===================================================================
--- extra-x86_64/lighttpd.rc.d 2009-03-21 11:22:56 UTC (rev 30692)
+++ extra-x86_64/lighttpd.rc.d 2009-03-21 11:23:28 UTC (rev 30693)
@@ -1,38 +1,67 @@
#!/bin/bash
-# general config
+daemon_name=lighttpd
+
. /etc/rc.conf
. /etc/rc.d/functions
-PID=`pidof -o %PPID /usr/sbin/lighttpd`
+get_pid() {
+ pidof -o %PPID $daemon_name
+}
case "$1" in
start)
- stat_busy "Starting lighttpd Daemon"
- [ -z "$PID" ] && /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf 2>&1
- if [ $? -gt 0 ]; then
+ stat_busy "Starting $daemon_name daemon"
+
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid
+ # RUN
+ $daemon_name -f /etc/lighttpd/lighttpd.conf
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ echo $(get_pid) > /var/run/$daemon_name.pid
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
stat_fail
- else
- add_daemon lighttpd
- stat_done
+ exit 1
fi
;;
+
stop)
- stat_busy "Stopping lighttpd Daemon"
- [ ! -z "$PID" ] && kill $PID &>/dev/null
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
if [ $? -gt 0 ]; then
stat_fail
+ exit 1
else
- rm_daemon lighttpd
- rm -f /var/run/lighttpd/lighttpd.pid
+ rm -f /var/run/$daemon_name.pid &> /dev/null
+ rm_daemon $daemon_name
stat_done
fi
;;
+
restart)
$0 stop
- sleep 1
+ sleep 3
$0 start
;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
*)
- echo "usage: $0 {start|stop|restart}"
+ echo "usage: $0 {start|stop|restart|status}"
esac
+
+exit 0
More information about the arch-commits
mailing list