summaryrefslogtreecommitdiff
path: root/network/lighttpd/doinst.sh
diff options
context:
space:
mode:
authorDaniel de Kok <danieldk@pobox.com>2010-05-11 15:01:30 +0200
committerMichiel van Wessem <michiel@slackbuilds.org>2010-05-11 15:01:30 +0200
commit6a2e7cb0c583c0ad634890fc732589f747ac400f (patch)
treea3f1f20b7f67c6fc4527ad9e460c494710c7082d /network/lighttpd/doinst.sh
parenta46972cf527a97b75c670ace2ed30f7eca85af6e (diff)
downloadslackbuilds-6a2e7cb0c583c0ad634890fc732589f747ac400f.tar.gz
network/lighttpd: Initial import
Diffstat (limited to 'network/lighttpd/doinst.sh')
-rw-r--r--network/lighttpd/doinst.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/network/lighttpd/doinst.sh b/network/lighttpd/doinst.sh
new file mode 100644
index 0000000000..8ead0ded15
--- /dev/null
+++ b/network/lighttpd/doinst.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+LIGHTTPD_USER=lighttpd
+LIGHTTPD_GROUP=lighttpd
+LIGHTTPD_HOME=/var/www
+
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/lighttpd/lighttpd.conf.new
+config etc/logrotate.d/lighttpd.new
+config etc/rc.d/rc.lighttpd.new