nixos/clickhouse: Notify systemd about successful startup (#232443)

https://github.com/ClickHouse/ClickHouse/pull/43400
https://github.com/ClickHouse/ClickHouse/pull/46613
This commit is contained in:
Yureka 2023-05-19 00:24:20 +02:00 committed by GitHub
parent bec29a0327
commit 97c8817371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,7 @@ with lib;
after = [ "network.target" ];
serviceConfig = {
Type = "notify";
User = "clickhouse";
Group = "clickhouse";
ConfigurationDirectory = "clickhouse-server";
@ -55,6 +56,12 @@ with lib;
StateDirectory = "clickhouse";
LogsDirectory = "clickhouse";
ExecStart = "${cfg.package}/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml";
TimeoutStartSec = "infinity";
};
environment = {
# Switching off watchdog is very important for sd_notify to work correctly.
CLICKHOUSE_WATCHDOG_ENABLE = "0";
};
};