mirror of
https://github.com/openwrt/packages.git
synced 2025-02-07 04:39:51 +00:00
76f17ab15b
The challenge directory (for webroot challenges) is on a tmpfs, which means it doesn't exist on boot. Some web servers (uhttpd in particular) don't like being configured to serve files from a non-existent directory. So add a boot() section to the ACME init script that just creates the challenge directory, and make sure it runs relatively early. That should take care of the non-existent directory issue, while still keeping the actual certificate renewal controlled by cron. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
63 lines
1.4 KiB
Makefile
63 lines
1.4 KiB
Makefile
#
|
|
# Copyright (C) 2016 Toke Høiland-Jørgensen
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v3 or
|
|
# later.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=acme-common
|
|
PKG_VERSION:=1.4.1
|
|
|
|
PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
|
|
PKG_LICENSE:=GPL-3.0-only
|
|
PKG_LICENSE_FILES:=LICENSE.md
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/acme-common
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
TITLE:=ACME client wrapper common files
|
|
PKGARCH:=all
|
|
endef
|
|
|
|
define Package/acme-common/description
|
|
ACME client wrapper common files.
|
|
endef
|
|
|
|
define Package/acme-common/conffiles
|
|
/etc/config/acme
|
|
/etc/acme
|
|
/etc/ssl/acme
|
|
endef
|
|
|
|
define Package/acme-common/install
|
|
$(INSTALL_DIR) $(1)/etc/acme
|
|
$(INSTALL_DIR) $(1)/etc/ssl/acme
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_CONF) ./files/acme.config $(1)/etc/config/acme
|
|
$(INSTALL_DIR) $(1)/usr/lib/acme
|
|
$(INSTALL_DATA) ./files/functions.sh $(1)/usr/lib/acme
|
|
$(INSTALL_BIN) ./files/acme-notify.sh $(1)/usr/lib/acme/notify
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./files/acme.init $(1)/etc/init.d/acme
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
$(INSTALL_DATA) ./files/acme.uci-defaults $(1)/etc/uci-defaults/acme
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/acme
|
|
endef
|
|
|
|
define Package/acme-common/prerm
|
|
#!/bin/sh
|
|
sed -i '\|/etc/init.d/acme|d' /etc/crontabs/root
|
|
endef
|
|
|
|
define Build/Configure
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,acme-common))
|