mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-27 09:34:51 +02:00
chore: Add CONTINUWUITY_ environment variables
Also updates some examples to match
This commit is contained in:
parent
c04378e9a7
commit
256fbc6ea5
2 changed files with 11 additions and 5 deletions
7
debian/conduwuit.service
vendored
7
debian/conduwuit.service
vendored
|
@ -1,9 +1,10 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=conduwuit Matrix homeserver
|
|
||||||
|
Description=Continuwuity - Matrix homeserver
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
Alias=matrix-conduwuit.service
|
|
||||||
Documentation=https://continuwuity.org/
|
Documentation=https://continuwuity.org/
|
||||||
|
Alias=matrix-conduwuit.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
DynamicUser=yes
|
DynamicUser=yes
|
||||||
|
@ -11,7 +12,7 @@ User=conduwuit
|
||||||
Group=conduwuit
|
Group=conduwuit
|
||||||
Type=notify
|
Type=notify
|
||||||
|
|
||||||
Environment="CONDUWUIT_CONFIG=/etc/conduwuit/conduwuit.toml"
|
Environment="CONTINUWUITY_CONFIG=/etc/conduwuit/conduwuit.toml"
|
||||||
|
|
||||||
ExecStart=/usr/sbin/conduwuit
|
ExecStart=/usr/sbin/conduwuit
|
||||||
|
|
||||||
|
|
|
@ -1962,7 +1962,11 @@ impl Config {
|
||||||
where
|
where
|
||||||
I: Iterator<Item = &'a Path>,
|
I: Iterator<Item = &'a Path>,
|
||||||
{
|
{
|
||||||
let envs = [Env::var("CONDUIT_CONFIG"), Env::var("CONDUWUIT_CONFIG")];
|
let envs = [
|
||||||
|
Env::var("CONDUIT_CONFIG"),
|
||||||
|
Env::var("CONDUWUIT_CONFIG"),
|
||||||
|
Env::var("CONTINUWUITY_CONFIG"),
|
||||||
|
];
|
||||||
|
|
||||||
let config = envs
|
let config = envs
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
@ -1971,7 +1975,8 @@ impl Config {
|
||||||
.chain(paths.map(Toml::file))
|
.chain(paths.map(Toml::file))
|
||||||
.fold(Figment::new(), |config, file| config.merge(file.nested()))
|
.fold(Figment::new(), |config, file| config.merge(file.nested()))
|
||||||
.merge(Env::prefixed("CONDUIT_").global().split("__"))
|
.merge(Env::prefixed("CONDUIT_").global().split("__"))
|
||||||
.merge(Env::prefixed("CONDUWUIT_").global().split("__"));
|
.merge(Env::prefixed("CONDUWUIT_").global().split("__"))
|
||||||
|
.merge(Env::prefixed("CONTINUWUITY_").global().split("__"));
|
||||||
|
|
||||||
Ok(config)
|
Ok(config)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue