summaryrefslogtreecommitdiff
path: root/network/lighttpd
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2012-09-12 16:32:43 -0500
committerRobby Workman <rworkman@slackbuilds.org>2012-09-12 18:05:13 -0500
commit09bf0257aa05ef1d8767bf9e83c310785fc0ccf4 (patch)
tree2e982204e6148004ce59afb904e365ad49933c42 /network/lighttpd
parentcb5f327002eb0d9f866c6d3c9f203ed8304f7b20 (diff)
downloadslackbuilds-09bf0257aa05ef1d8767bf9e83c310785fc0ccf4.tar.gz
network/lighttpd: Fixed logrotate script (added "su" directive)
This commit includes a few other associated changes. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/lighttpd')
-rw-r--r--network/lighttpd/conf/lighttpd.logrotate1
-rw-r--r--network/lighttpd/conf/rc.lighttpd2
-rw-r--r--network/lighttpd/lighttpd.SlackBuild17
3 files changed, 13 insertions, 7 deletions
diff --git a/network/lighttpd/conf/lighttpd.logrotate b/network/lighttpd/conf/lighttpd.logrotate
index 65c13f36c8..7001f869bd 100644
--- a/network/lighttpd/conf/lighttpd.logrotate
+++ b/network/lighttpd/conf/lighttpd.logrotate
@@ -1,4 +1,5 @@
/var/log/lighttpd/*.log {
+ su @USER@ @GROUP@
daily
missingok
copytruncate
diff --git a/network/lighttpd/conf/rc.lighttpd b/network/lighttpd/conf/rc.lighttpd
index 919f6b2104..d2357dfc1a 100644
--- a/network/lighttpd/conf/rc.lighttpd
+++ b/network/lighttpd/conf/rc.lighttpd
@@ -35,6 +35,8 @@ lighttpd_start() {
echo "Already running!"
return
fi
+ mkdir -p $(dirname $PIDFILE)
+ chown -R @USER@:@GROUP@ $(dirname $PIDFILE)
$LIGHTTPD $LIGHTTPD_OPTIONS
}
diff --git a/network/lighttpd/lighttpd.SlackBuild b/network/lighttpd/lighttpd.SlackBuild
index 46b7245822..a22ac298e6 100644
--- a/network/lighttpd/lighttpd.SlackBuild
+++ b/network/lighttpd/lighttpd.SlackBuild
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=lighttpd
-VERSION=1.4.31
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.4.31}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -105,13 +105,16 @@ chmod 0700 $PKG/var/cache/lighttpd
mkdir -p $PKG/var/www/htdocs-lighttpd
touch $PKG/var/log/lighttpd/{access,error}.log.new
-# Create the default pid file directory (configurable in lighttpd.conf)
-mkdir -p $PKG/var/run/lighttpd
-chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/run/lighttpd
+mkdir -p $PKG/etc/rc.d
+sed -e "s,@USER@,$LIGHTTPD_USER," -e "s,@GROUP@,$LIGHTTPD_GROUP," \
+ $CWD/conf/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new
+chmod 0755 $PKG/etc/rc.d/rc.$PRGNAM.new
+
+mkdir -p $PKG/etc/logrotate.d
+sed -e "s,@USER@,$LIGHTTPD_USER," -e "s,@GROUP@,$LIGHTTPD_GROUP," \
+ $CWD/conf/$PRGNAM.logrotate > $PKG/etc/logrotate.d/lighttpd.new
-install -D -m 0755 $CWD/conf/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
install -D -m 0644 $CWD/conf/$PRGNAM.conf $PKG/etc/$PRGNAM/$PRGNAM.conf.new
-install -D -m 0644 $CWD/conf/$PRGNAM.logrotate $PKG/etc/logrotate.d/lighttpd.new
chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/log/lighttpd/
chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/cache/lighttpd