diff options
Diffstat (limited to 'network')
-rw-r--r-- | network/lighttpd/README | 1 | ||||
-rw-r--r-- | network/lighttpd/doinst.sh | 4 | ||||
-rw-r--r-- | network/lighttpd/lighttpd.SlackBuild | 13 | ||||
-rw-r--r-- | network/lighttpd/lighttpd.info | 8 | ||||
-rw-r--r-- | network/lighttpd/rc.lighttpd | 17 |
5 files changed, 19 insertions, 24 deletions
diff --git a/network/lighttpd/README b/network/lighttpd/README index 5622d52f80448..6a9e3e0cf19e2 100644 --- a/network/lighttpd/README +++ b/network/lighttpd/README @@ -33,4 +33,3 @@ to stop lighttpd on system shutdown. if [ -x /etc/rc.d/rc.lighttpd ]; then /etc/rc.d/rc.lighttpd stop fi - diff --git a/network/lighttpd/doinst.sh b/network/lighttpd/doinst.sh index 8ead0ded15a6c..172a5987b9ccd 100644 --- a/network/lighttpd/doinst.sh +++ b/network/lighttpd/doinst.sh @@ -1,9 +1,5 @@ #!/bin/sh -LIGHTTPD_USER=lighttpd -LIGHTTPD_GROUP=lighttpd -LIGHTTPD_HOME=/var/www - config() { NEW="$1" OLD="`dirname $NEW`/`basename $NEW .new`" diff --git a/network/lighttpd/lighttpd.SlackBuild b/network/lighttpd/lighttpd.SlackBuild index b60186d95adb4..f81427f25cb1a 100644 --- a/network/lighttpd/lighttpd.SlackBuild +++ b/network/lighttpd/lighttpd.SlackBuild @@ -28,18 +28,17 @@ set -e PRGNAM=lighttpd -VERSION=1.4.15 +VERSION=1.4.18 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -CWD=`pwd` +CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} ## lighttpd user & group. *MUST* exist before package creation # See http://slackbuilds.org/uid_gid.txt for current recomendations. -# If you change this, please update httpd.conf.diff in patches directory. LIGHTTPD_USER=lighttpd LIGHTTPD_GROUP=lighttpd @@ -55,9 +54,6 @@ if ! grep ^$LIGHTTPD_USER: /etc/passwd > /dev/null 2>&1; then exit 1 fi - - - if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then @@ -80,6 +76,7 @@ CXXFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib/$PRGNAM \ --sysconfdir=/etc \ --localstatedir=/var \ + --mandir=/usr/man \ --with-pcre \ --with-attr \ --with-openssl @@ -91,8 +88,6 @@ mkdir -p $PKG/var/{cache,log}/$PRGNAM chmod 0700 $PKG/var/cache/lighttpd mkdir -p $PKG/var/www/htdocs-lighttpd touch $PKG/var/log/lighttpd/{access,error}.log -mv $PKG/usr/share/man $PKG/usr/ -rmdir $PKG/usr/share install -D -m 0755 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new install -D -m 0644 $CWD/$PRGNAM.conf $PKG/etc/$PRGNAM/$PRGNAM.conf.new @@ -100,7 +95,7 @@ install -D -m 0644 $CWD/$PRGNAM.logrotate $PKG/etc/logrotate.d/lighttpd.new ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; - for i in `find . -type l` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/network/lighttpd/lighttpd.info b/network/lighttpd/lighttpd.info index 3a8ac62a3dd47..df79d69b53f57 100644 --- a/network/lighttpd/lighttpd.info +++ b/network/lighttpd/lighttpd.info @@ -1,8 +1,8 @@ PRGNAM="lighttpd" -VERSION="1.4.15" +VERSION="1.4.18" HOMEPAGE="http://www.lighttpd.net/" -DOWNLOAD="http://www.lighttpd.net/download/lighttpd-1.4.15.tar.gz" -MD5SUM="d2ceaaf242b2b3593ff4d8222d543649" +DOWNLOAD="http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz" +MD5SUM="26f98dddf9d8c0775221b800986003ee" MAINTAINER="Daniel de Kok" EMAIL="danieldk@pobox.com" -APPROVED="BP{k}" +APPROVED="rworkman" diff --git a/network/lighttpd/rc.lighttpd b/network/lighttpd/rc.lighttpd index cb180c3e88ee4..2f31a40e69ce7 100644 --- a/network/lighttpd/rc.lighttpd +++ b/network/lighttpd/rc.lighttpd @@ -1,6 +1,5 @@ #!/bin/sh # Copyright (c) 2007, Daniel de Kok <moc.mikciat@leinad> -# Modified by Martin Lefebvre <dadexter@sekurity.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,11 +24,15 @@ LIGHTTPD=/usr/sbin/lighttpd PIDFILE=/var/run/lighttpd.pid LIGHTTPD_OPTIONS="-f /etc/lighttpd/lighttpd.conf" +is_pidof() { + local STATE=$(ps -p $1 -o cmd= | grep "$2" > /dev/null ; echo $?) + return $STATE +} + lighttpd_start() { echo "Starting lighttpd: $LIGHTTPD" - if [ -r $PIDFILE ]; then - echo "Already running or stale PID file" - echo "If it's not running, remove $PIDFILE" + if [ -r $PIDFILE ] && is_pidof $(cat $PIDFILE) lighttpd ; then + echo "Already running!" return fi $LIGHTTPD $LIGHTTPD_OPTIONS @@ -37,9 +40,11 @@ lighttpd_start() { lighttpd_stop() { echo "Stopping lighttpd: $LIGHTTPD" - if [ -r $PIDFILE ]; then - kill -3 `cat $PIDFILE` + if [ -r $PIDFILE ] && is_pidof $(cat $PIDFILE) lighttpd ; then + kill $(cat $PIDFILE) rm -f $PIDFILE + else + echo "Not running!" fi } |