mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-27 19:07:33 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29f138ed0f | ||
|
|
5c07d60403 |
No files matched your search
Generated
-1
@@ -1121,7 +1121,6 @@ dependencies = [
|
|||||||
"reqwest",
|
"reqwest",
|
||||||
"ruma",
|
"ruma",
|
||||||
"rustyline-async",
|
"rustyline-async",
|
||||||
"sd-notify",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_yml",
|
"serde_yml",
|
||||||
|
|||||||
@@ -12,13 +12,14 @@ Group=conduwuit
|
|||||||
Type=notify-reload
|
Type=notify-reload
|
||||||
ReloadSignal=SIGUSR1
|
ReloadSignal=SIGUSR1
|
||||||
|
|
||||||
Environment="CONTINUWUITY_CONFIG=/etc/conduwuit/conduwuit.toml"
|
|
||||||
|
|
||||||
Environment="CONTINUWUITY_LOG_TO_JOURNALD=true"
|
Environment="CONTINUWUITY_LOG_TO_JOURNALD=true"
|
||||||
Environment="CONTINUWUITY_JOURNALD_IDENTIFIER=%N"
|
Environment="CONTINUWUITY_JOURNALD_IDENTIFIER=%N"
|
||||||
Environment="CONTINUWUITY_DATABASE_PATH=/var/lib/conduwuit"
|
Environment="CONTINUWUITY_DATABASE_PATH=%S/conduwuit"
|
||||||
|
Environment="CONTINUWUITY_CONFIG_RELOAD_SIGNAL=true"
|
||||||
|
|
||||||
ExecStart=/usr/bin/conduwuit
|
LoadCredential=conduwuit.toml:/etc/conduwuit/conduwuit.toml
|
||||||
|
|
||||||
|
ExecStart=/usr/bin/conduwuit --config ${CREDENTIALS_DIRECTORY}/conduwuit.toml
|
||||||
|
|
||||||
AmbientCapabilities=
|
AmbientCapabilities=
|
||||||
CapabilityBoundingSet=
|
CapabilityBoundingSet=
|
||||||
@@ -52,8 +53,9 @@ SystemCallFilter=@system-service @resources
|
|||||||
SystemCallFilter=~@clock @debug @module @mount @reboot @swap @cpu-emulation @obsolete @timer @chown @setuid @privileged @keyring @ipc
|
SystemCallFilter=~@clock @debug @module @mount @reboot @swap @cpu-emulation @obsolete @timer @chown @setuid @privileged @keyring @ipc
|
||||||
SystemCallErrorNumber=EPERM
|
SystemCallErrorNumber=EPERM
|
||||||
|
|
||||||
|
# ConfigurationDirectory isn't specified here because it's created by
|
||||||
|
# the distro's package manager.
|
||||||
StateDirectory=conduwuit
|
StateDirectory=conduwuit
|
||||||
ConfigurationDirectory=conduwuit
|
|
||||||
RuntimeDirectory=conduwuit
|
RuntimeDirectory=conduwuit
|
||||||
RuntimeDirectoryMode=0750
|
RuntimeDirectoryMode=0750
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ find .cargo/registry/ -executable -name "*.rs" -exec chmod -x {} +
|
|||||||
%install
|
%install
|
||||||
install -Dpm0755 target/rpm/conduwuit -t %{buildroot}%{_bindir}
|
install -Dpm0755 target/rpm/conduwuit -t %{buildroot}%{_bindir}
|
||||||
install -Dpm0644 pkg/conduwuit.service -t %{buildroot}%{_unitdir}
|
install -Dpm0644 pkg/conduwuit.service -t %{buildroot}%{_unitdir}
|
||||||
install -Dpm0644 conduwuit-example.toml %{buildroot}%{_sysconfdir}/conduwuit/conduwuit.toml
|
install -Dpm0600 conduwuit-example.toml %{buildroot}%{_sysconfdir}/conduwuit/conduwuit.toml
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@@ -60,7 +60,7 @@ install -Dpm0644 conduwuit-example.toml %{buildroot}%{_sysconfdir}/conduwuit/con
|
|||||||
%doc CONTRIBUTING.md
|
%doc CONTRIBUTING.md
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%doc SECURITY.md
|
%doc SECURITY.md
|
||||||
%config %{_sysconfdir}/conduwuit/conduwuit.toml
|
%config(noreplace) %{_sysconfdir}/conduwuit/conduwuit.toml
|
||||||
|
|
||||||
%{_bindir}/conduwuit
|
%{_bindir}/conduwuit
|
||||||
%{_unitdir}/conduwuit.service
|
%{_unitdir}/conduwuit.service
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ sentry_telemetry = [
|
|||||||
]
|
]
|
||||||
systemd = [
|
systemd = [
|
||||||
"conduwuit-router/systemd",
|
"conduwuit-router/systemd",
|
||||||
"conduwuit-service/systemd"
|
|
||||||
]
|
]
|
||||||
journald = [ # This is a stub on non-unix platforms
|
journald = [ # This is a stub on non-unix platforms
|
||||||
"dep:tracing-journald",
|
"dep:tracing-journald",
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ io_uring = [
|
|||||||
"conduwuit-admin/io_uring",
|
"conduwuit-admin/io_uring",
|
||||||
"conduwuit-api/io_uring",
|
"conduwuit-api/io_uring",
|
||||||
"conduwuit-service/io_uring",
|
"conduwuit-service/io_uring",
|
||||||
|
"conduwuit-api/io_uring",
|
||||||
]
|
]
|
||||||
jemalloc = [
|
jemalloc = [
|
||||||
"conduwuit-admin/jemalloc",
|
"conduwuit-admin/jemalloc",
|
||||||
|
|||||||
+2
-2
@@ -65,7 +65,7 @@ pub(crate) async fn start(server: Arc<Server>) -> Result<Arc<Services>> {
|
|||||||
let services = Services::build(server).await?.start().await?;
|
let services = Services::build(server).await?.start().await?;
|
||||||
|
|
||||||
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
||||||
sd_notify::notify(false, &[sd_notify::NotifyState::Ready])
|
sd_notify::notify(true, &[sd_notify::NotifyState::Ready])
|
||||||
.expect("failed to notify systemd of ready state");
|
.expect("failed to notify systemd of ready state");
|
||||||
|
|
||||||
debug!("Started");
|
debug!("Started");
|
||||||
@@ -78,7 +78,7 @@ pub(crate) async fn stop(services: Arc<Services>) -> Result<()> {
|
|||||||
debug!("Shutting down...");
|
debug!("Shutting down...");
|
||||||
|
|
||||||
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
||||||
sd_notify::notify(false, &[sd_notify::NotifyState::Stopping])
|
sd_notify::notify(true, &[sd_notify::NotifyState::Stopping])
|
||||||
.expect("failed to notify systemd of stopping state");
|
.expect("failed to notify systemd of stopping state");
|
||||||
|
|
||||||
// Wait for all completions before dropping or we'll lose them to the module
|
// Wait for all completions before dropping or we'll lose them to the module
|
||||||
|
|||||||
@@ -67,9 +67,6 @@ release_max_log_level = [
|
|||||||
"tracing/max_level_trace",
|
"tracing/max_level_trace",
|
||||||
"tracing/release_max_level_info",
|
"tracing/release_max_level_info",
|
||||||
]
|
]
|
||||||
systemd = [
|
|
||||||
"dep:sd-notify",
|
|
||||||
]
|
|
||||||
url_preview = [
|
url_preview = [
|
||||||
"dep:image",
|
"dep:image",
|
||||||
"dep:webpage",
|
"dep:webpage",
|
||||||
@@ -122,9 +119,5 @@ blurhash.optional = true
|
|||||||
recaptcha-verify = { version = "0.1.5", default-features = false }
|
recaptcha-verify = { version = "0.1.5", default-features = false }
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
|
|
||||||
[target.'cfg(all(unix, target_os = "linux"))'.dependencies]
|
|
||||||
sd-notify.workspace = true
|
|
||||||
sd-notify.optional = true
|
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
@@ -45,16 +45,13 @@ impl Deref for Service {
|
|||||||
fn handle_reload(&self) -> Result {
|
fn handle_reload(&self) -> Result {
|
||||||
if self.server.config.config_reload_signal {
|
if self.server.config.config_reload_signal {
|
||||||
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
||||||
sd_notify::notify(false, &[
|
sd_notify::notify(true, &[sd_notify::NotifyState::Reloading])
|
||||||
sd_notify::NotifyState::Reloading,
|
.expect("failed to notify systemd of reloading state");
|
||||||
sd_notify::NotifyState::monotonic_usec_now().expect("Failed to read monotonic time"),
|
|
||||||
])
|
|
||||||
.expect("failed to notify systemd of reloading state");
|
|
||||||
|
|
||||||
self.reload(iter::empty())?;
|
self.reload(iter::empty())?;
|
||||||
|
|
||||||
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
#[cfg(all(feature = "systemd", target_os = "linux"))]
|
||||||
sd_notify::notify(false, &[sd_notify::NotifyState::Ready])
|
sd_notify::notify(true, &[sd_notify::NotifyState::Ready])
|
||||||
.expect("failed to notify systemd of ready state");
|
.expect("failed to notify systemd of ready state");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user