tv ejabberd: sync service with upstream template
Incorporate parts from ejabberd 21.04's ejabberd.service.template
This commit is contained in:
parent
876fd5404d
commit
3f1a9c5375
@ -82,20 +82,32 @@ in {
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = pkgs.writeDash "ejabberd" ''
|
ExecStartPre = [
|
||||||
${pkgs.coreutils}/bin/ln -s "$CREDENTIALS_DIRECTORY" /tmp/credentials
|
"${pkgs.coreutils}/bin/ln -s \${CREDENTIALS_DIRECTORY} /tmp/credentials"
|
||||||
${gen-dhparam} ${cfg.stateDir}/dhfile
|
"${gen-dhparam} ${cfg.stateDir}/dhfile"
|
||||||
exec ${cfg.pkgs.ejabberd}/bin/ejabberdctl foreground
|
];
|
||||||
'';
|
ExecStart = "${cfg.pkgs.ejabberd}/bin/ejabberdctl foreground";
|
||||||
|
ExecStop = [
|
||||||
|
"${cfg.pkgs.ejabberd}/bin/ejabberdctl stop"
|
||||||
|
"${cfg.pkgs.ejabberd}/bin/ejabberdctl stopped"
|
||||||
|
];
|
||||||
|
ExecReload = "${cfg.pkgs.ejabberd}/bin/ejabberdctl reload_config";
|
||||||
LoadCredential = [
|
LoadCredential = [
|
||||||
"certfile:${cfg.certfile}"
|
"certfile:${cfg.certfile}"
|
||||||
];
|
];
|
||||||
|
LimitNOFILE = 65536;
|
||||||
|
PrivateDevices = true;
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
SyslogIdentifier = "ejabberd";
|
SyslogIdentifier = "ejabberd";
|
||||||
StateDirectory = "ejabberd";
|
StateDirectory = "ejabberd";
|
||||||
User = "ejabberd";
|
User = "ejabberd";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
TimeoutStartSec = 60;
|
TimeoutSec = 60;
|
||||||
|
RestartSec = 5;
|
||||||
|
Restart = "on-failure";
|
||||||
|
Type = "notify";
|
||||||
|
NotifyAccess = "all";
|
||||||
|
WatchdogSec = 30;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user