tv ejabberd: sudo -u ejabberd ejabberdctl
This commit is contained in:
parent
7e5bfd450f
commit
0b7a415231
@ -72,7 +72,21 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = [ cfg.pkgs.ejabberd ];
|
environment.systemPackages = [
|
||||||
|
(pkgs.symlinkJoin {
|
||||||
|
name = "ejabberd-sudo-wrapper";
|
||||||
|
paths = [
|
||||||
|
(pkgs.writeDashBin "ejabberdctl" ''
|
||||||
|
set -efu
|
||||||
|
cd ${shell.escape cfg.user.home}
|
||||||
|
exec /run/wrappers/bin/sudo \
|
||||||
|
-u ${shell.escape cfg.user.name} \
|
||||||
|
${cfg.pkgs.ejabberd}/bin/ejabberdctl "$@"
|
||||||
|
'')
|
||||||
|
cfg.pkgs.ejabberd
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
krebs.secret.files = {
|
krebs.secret.files = {
|
||||||
ejabberd-certfile = cfg.certfile;
|
ejabberd-certfile = cfg.certfile;
|
||||||
|
Loading…
Reference in New Issue
Block a user