fix: Ensure mumble's folder ownership

This commit is contained in:
Inex Code 2024-12-26 11:04:43 +03:00
parent a4d2c06c64
commit 0a698cebe5
No known key found for this signature in database

View file

@ -64,7 +64,9 @@ in
options = [
"bind"
"x-systemd.required-by=murmur.service"
"x-systemd.required-by=murmur-ensure-folder-ownership.service"
"x-systemd.before=murmur.service"
"x-systemd.before=murmur-ensure-folder-ownership.service"
];
};
};
@ -77,7 +79,18 @@ in
};
systemd = {
services = {
murmur.serviceConfig.Slice = "mumble.slice";
murmur = { serviceConfig.Slice = "mumble.slice"; };
murmur-ensure-folder-ownership = {
description = "Ensure murmur folder ownership";
before = [ "murmur.service" ];
requiredBy = [ "murmur.service" ];
serviceConfig.Type = "oneshot";
serviceConfig.Slice = "mumble.slice";
path = with pkgs; [ coreutils ];
script = ''
chown -R murmur:murmur /var/lib/murmur
'';
};
};
slices.mumble = {
description = "Mumble service slice";