nixos/security/acme: fix acme folder permissions

This commit is contained in:
lassulus
2017-05-11 18:49:26 +02:00
committed by Rok Garbas
parent 8b17444047
commit fd7a8f1b91
+4 -1
View File
@@ -185,12 +185,15 @@ in
path = [ pkgs.simp_le ];
preStart = ''
mkdir -p '${cfg.directory}'
chown -R '${data.user}:${data.group}' '${cfg.directory}'
chown 'root:root' '${cfg.directory}'
chmod 755 '${cfg.directory}'
if [ ! -d '${cpath}' ]; then
mkdir '${cpath}'
fi
chmod ${rights} '${cpath}'
chown -R '${data.user}:${data.group}' '${cpath}'
mkdir -p '${data.webroot}/.well-known/acme-challenge'
chown -R '${data.user}:${data.group}' '${data.webroot}/.well-known/acme-challenge'
'';
script = ''
cd '${cpath}'