diff --git a/README.md b/README.md index 13982eb..db9bacf 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,8 @@ deno install \ # OR ./cohamail -h ``` + +## Configuration + +You can override default config and templates with your own in +`/etc/cohabit/mailer/(config|templates)/`. diff --git a/cli/_templates_loader.ts b/cli/_templates_loader.ts index 2cb7742..a2a45ae 100644 --- a/cli/_templates_loader.ts +++ b/cli/_templates_loader.ts @@ -19,7 +19,7 @@ for (const template of Object.values(defaultTemplates)) { } //Load local templates -const basePath = '/etc/cohabit/mailer' +const basePath = '/etc/cohabit/mailer/templates' if (await exists(basePath)) { for await (const template of Deno.readDir(basePath)) { diff --git a/config/loader.ts b/config/loader.ts index b416d22..2d750d0 100644 --- a/config/loader.ts +++ b/config/loader.ts @@ -37,7 +37,7 @@ async function readJsonFile< return { ...defaultValue, ...json } } -const basePath = '/ect/cohabit/mailer' +const basePath = '/ect/cohabit/mailer/config' export const accounts = await readJsonFile( `${basePath}/account.json`,