mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 16:45:51 +03:00
nixos/charybdis: implement reload functionality
IRC daemons are highly stateful daemons, so allow config changes without
kicking all server and client connections.
Basically a port of 60c62214f5
.
This commit is contained in:
parent
ab5a3f8226
commit
1f726635ee
@ -85,14 +85,21 @@ in
|
|||||||
"d ${cfg.statedir} - ${cfg.user} ${cfg.group} - -"
|
"d ${cfg.statedir} - ${cfg.user} ${cfg.group} - -"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.etc."charybdis/ircd.conf".source = configFile;
|
||||||
|
|
||||||
systemd.services.charybdis = {
|
systemd.services.charybdis = {
|
||||||
description = "Charybdis IRC daemon";
|
description = "Charybdis IRC daemon";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
reloadIfChanged = true;
|
||||||
|
restartTriggers = [
|
||||||
|
configFile
|
||||||
|
];
|
||||||
environment = {
|
environment = {
|
||||||
BANDB_DBPATH = "${cfg.statedir}/ban.db";
|
BANDB_DBPATH = "${cfg.statedir}/ban.db";
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${charybdis}/bin/charybdis -foreground -logfile /dev/stdout -configfile ${configFile}";
|
ExecStart = "${charybdis}/bin/charybdis -foreground -logfile /dev/stdout -configfile /etc/charybdis/ircd.conf";
|
||||||
|
ExecReload = "${coreutils}/bin/kill -HUP $MAINPID";
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user