When LuCI uploads files like the SSL key and certificate, it makes the
files readable only by root. Since radicale is running as a
non-privileged user it is unable to access a certificate and key
uploaded by LuCI, therefore when SSL cert and key (and optional CA) are
configured, make them group radicale3 and group readable, so the
radicale server can use them.
Signed-off-by: Daniel F. Dickinson <redacted>
PYPI_SOURCE_NAME:=radicale
PKG_HASH:=569f2a8cf990faf9bb25b7442f36ddd439526b95db81d8878952d77836ab3d4c
+PKG_MAINTAINER:=Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
+
include ../../lang/python/pypi.mk
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python3-package.mk
conf_getline "$cfg" "$cfgfile" ssl 0 1
if [ "$value" -eq 1 ]; then
conf_getline "$cfg" "$cfgfile" certificate
+ if [ "$value" != "" ]; then
+ chgrp radicale3 "$value"
+ chmod g+r "$value"
+ fi
conf_getline "$cfg" "$cfgfile" key
+ if [ "$value" != "" ]; then
+ chgrp radicale3 "$value"
+ chmod g+r "$value"
+ fi
conf_getline "$cfg" "$cfgfile" certificate_authority
+ if [ "$value" != "" ]; then
+ chgrp radicale3 "$value"
+ chmod g+r "$value"
+ fi
conf_getline "$cfg" "$cfgfile" protocol
conf_getline "$cfg" "$cfgfile" ciphers
fi