caddy service: don't use extra dotdir in dataDir
This commit is contained in:
parent
071815cb24
commit
ac5258edb2
@ -89,6 +89,15 @@ rmdir /var/lib/ipfs/.ipfs
|
|||||||
The <literal>postgres</literal> default <literal>dataDir</literal> has changed from <literal>/var/db/postgres</literal> to <literal>/var/lib/postgresql/$psqlSchema</literal> where $psqlSchema is 9.6 for example.
|
The <literal>postgres</literal> default <literal>dataDir</literal> has changed from <literal>/var/db/postgres</literal> to <literal>/var/lib/postgresql/$psqlSchema</literal> where $psqlSchema is 9.6 for example.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <literal>caddy</literal> service was previously using an extra
|
||||||
|
<literal>.caddy</literal> in the data directory specified with the
|
||||||
|
<literal>dataDir</literal> option. The contents of the
|
||||||
|
<literal>.caddy</literal> directory are now expected to be in the
|
||||||
|
<literal>dataDir</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,11 @@ in
|
|||||||
dataDir = mkOption {
|
dataDir = mkOption {
|
||||||
default = "/var/lib/caddy";
|
default = "/var/lib/caddy";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = "The data directory, for storing certificates.";
|
description = ''
|
||||||
|
The data directory, for storing certificates. Before 17.09, this
|
||||||
|
would create a .caddy directory. With 17.09 the contents of the
|
||||||
|
.caddy directory are in the specified data directory instead.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
@ -52,6 +56,8 @@ in
|
|||||||
description = "Caddy web server";
|
description = "Caddy web server";
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
|
||||||
|
{ CADDYPATH = cfg.dataDir; };
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${cfg.package.bin}/bin/caddy -root=/var/tmp -conf=${configFile} \
|
${cfg.package.bin}/bin/caddy -root=/var/tmp -conf=${configFile} \
|
||||||
|
Loading…
Reference in New Issue
Block a user