packages/lighttpd: use new service functions (closes: #10246)
authorNicolas Thill <nico@openwrt.org>
Fri, 18 Nov 2011 23:14:10 +0000 (23:14 +0000)
committerNicolas Thill <nico@openwrt.org>
Fri, 18 Nov 2011 23:14:10 +0000 (23:14 +0000)
SVN-Revision: 29253

net/lighttpd/Makefile
net/lighttpd/files/lighttpd.default [deleted file]
net/lighttpd/files/lighttpd.init

index 1bdb6ac768d24394803634cd82ac031687cca03e..563e49db396e104077588c9d77c9158fb2da1b30 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lighttpd
 PKG_VERSION:=1.4.29
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.lighttpd.net/lighttpd/releases-1.4.x
@@ -252,14 +252,11 @@ endef
 
 define Package/lighttpd/conffiles
 /etc/lighttpd/lighttpd.conf
-/etc/default/lighttpd
 endef
 
 define Package/lighttpd/install
        $(INSTALL_DIR) $(1)/etc/lighttpd
        $(INSTALL_DATA) ./files/lighttpd.conf $(1)/etc/lighttpd/
-       $(INSTALL_DIR) $(1)/etc/default
-       $(INSTALL_DATA) ./files/lighttpd.default $(1)/etc/default/lighttpd
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/lighttpd.init $(1)/etc/init.d/lighttpd
        $(INSTALL_DIR) $(1)/usr/lib/lighttpd
diff --git a/net/lighttpd/files/lighttpd.default b/net/lighttpd/files/lighttpd.default
deleted file mode 100644 (file)
index 340a1d2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-OPTIONS="-f /etc/lighttpd/lighttpd.conf"
index 550d5ad16386b52a4a94a73661195cc80e4ce062..d73a5da98da4ad61401720939da85480f30d5266 100644 (file)
@@ -1,21 +1,16 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
-START=50
+# Copyright (C) 2006-2011 OpenWrt.org
+
+SERVICE_USE_PID=1
 
-BIN=lighttpd
-DEFAULT=/etc/default/$BIN
-LOG_D=/var/log/$BIN
-RUN_D=/var/run
-PID_F=$RUN_D/$BIN.pid
+START=50
 
 start() {
-       [ -f $DEFAULT ] && . $DEFAULT
-       mkdir -p $LOG_D
-       mkdir -p $RUN_D
-       $BIN $OPTIONS
+       mkdir -m 0755 -p /var/log/lighttpd
+       service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
 }
 
 stop() {
-       [ -f $PID_F ] && kill $(cat $PID_F)
+       service_stop /usr/sbin/lighttpd
 }