Browse Source

lighttpd: add config for logrotate

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
lilik-openwrt-22.03
Jan Pavlinec 4 years ago
committed by Josef Schlehofer
parent
commit
aa80a02340
2 changed files with 22 additions and 2 deletions
  1. +14
    -2
      net/lighttpd/Makefile
  2. +8
    -0
      net/lighttpd/files/lighttpd.logrotate

+ 14
- 2
net/lighttpd/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=lighttpd
PKG_VERSION:=1.4.55
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x
@ -41,7 +41,7 @@ endef
define Package/lighttpd
$(call Package/lighttpd/Default)
MENU:=1
DEPENDS:=+LIGHTTPD_SSL:libopenssl +libpcre +libpthread
DEPENDS:=+LIGHTTPD_SSL:libopenssl +libpcre +libpthread +LIGHTTPD_LOGROTATE:logrotate
TITLE:=A flexible and lightweight web server
endef
@ -54,6 +54,13 @@ config LIGHTTPD_SSL
Implements SSL support in lighttpd (using libopenssl). This
option is required if you enable the SSL engine in your
lighttpd confguration file.
config LIGHTTPD_LOGROTATE
bool "Logrotate support"
depends on PACKAGE_lighttpd
default n
help
It adds support for logrotate functionality.
endef
MESON_ARGS += \
@ -104,6 +111,11 @@ define Package/lighttpd/install
done
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(1)/usr/sbin/
ifneq ($(strip $(CONFIG_LIGHTTPD_LOGROTATE)),)
$(INSTALL_DIR) $(1)/etc/logrotate.d
$(CP) ./files/lighttpd.logrotate $(1)/etc/logrotate.d/lighttpd.conf
endif
endef
define BuildPlugin


+ 8
- 0
net/lighttpd/files/lighttpd.logrotate View File

@ -0,0 +1,8 @@
/var/log/lighttpd/error.log {
maxsize 1M
compress
delaycompress
postrotate
/etc/init.d/lighttpd reload
endscript
}

Loading…
Cancel
Save