packages/lighttpd: use new service functions (closes: #10246)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@29253 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2011-11-18 23:14:10 +00:00
parent d21e36142b
commit d5a98f807d
3 changed files with 8 additions and 17 deletions

View 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

View File

@ -1 +0,0 @@
OPTIONS="-f /etc/lighttpd/lighttpd.conf"

View File

@ -1,21 +1,16 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2011 OpenWrt.org
SERVICE_USE_PID=1
START=50
BIN=lighttpd
DEFAULT=/etc/default/$BIN
LOG_D=/var/log/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
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
}