From: Sergey Ponomarev Date: Tue, 28 May 2024 19:14:06 +0000 (+0300) Subject: acme-common: create a symlink to webroot X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=6ffc7a2717107813b8b15290dff92d99b7380439;p=openwrt-packages.git acme-common: create a symlink to webroot The webroot option was deprecated and users should use the /var/run/acme/challenge by default. The folder itself should be exposed to web. The simplest way to do this is to create a symlink from /www. This is a default web location for most routers and should cover most cases. Signed-off-by: Sergey Ponomarev --- diff --git a/net/acme-common/Makefile b/net/acme-common/Makefile index 4eace5062..2543830f8 100644 --- a/net/acme-common/Makefile +++ b/net/acme-common/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acme-common -PKG_VERSION:=1.2.0 +PKG_VERSION:=1.3.0 PKG_MAINTAINER:=Toke Høiland-Jørgensen PKG_LICENSE:=GPL-3.0-only diff --git a/net/acme-common/files/acme.uci-defaults b/net/acme-common/files/acme.uci-defaults index 206f87e23..578cc6eff 100644 --- a/net/acme-common/files/acme.uci-defaults +++ b/net/acme-common/files/acme.uci-defaults @@ -1,4 +1,9 @@ #!/bin/sh +# Create a symlink to webroot +if [ -d /www/ ] && [ ! -L /www/.well-known/acme-challenge ] && [ ! -d /www/.well-known/acme-challenge/ ]; then + mkdir -p /www/.well-known/ + ln -s /var/run/acme/challenge/ /www/.well-known/acme-challenge +fi grep -q '/etc/init.d/acme' /etc/crontabs/root 2>/dev/null && exit 0 echo "0 0 * * * /etc/init.d/acme start" >>/etc/crontabs/root