From 6ffc7a2717107813b8b15290dff92d99b7380439 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Tue, 28 May 2024 22:14:06 +0300 Subject: [PATCH] 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 --- net/acme-common/Makefile | 2 +- net/acme-common/files/acme.uci-defaults | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/net/acme-common/Makefile b/net/acme-common/Makefile index 4eace5062c..2543830f8f 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 206f87e23d..578cc6effa 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 -- 2.30.2