mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
fix netcup-dns systemd service
This commit is contained in:
parent
04503b1dca
commit
3a28cd3f53
@ -64,7 +64,19 @@ in
|
||||
User = "netcup-dns";
|
||||
Nice = 19;
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${pkgs.python3.withPackages my-python-packages}/bin/netcup-dns";
|
||||
|
||||
# Create directory `/run/netcup-dns`.
|
||||
# `netcup-dns` uses it for caching.
|
||||
# For systemd to create this directory automatically, `PermissionsStartOnly` is required: https://unix.stackexchange.com/questions/354583/how-to-automatically-create-a-runtime-folder-with-a-systemd-service-or-tmpfiles#comment628290_354583
|
||||
RuntimeDirectoryMode = "0755";
|
||||
RuntimeDirectory = "netcup-dns";
|
||||
PermissionsStartOnly = true;
|
||||
# Since we use `/run/netcup-dns` for caching between subsequent runs of `netcup-dns`, it should be kept and not deleted.
|
||||
# Man page section `RuntimeDirectoryPreserve`:
|
||||
# If set to yes, then the directories are not removed when the service is stopped. Note that since the runtime directory /run/ is a mount point of "tmpfs", then for system services the directories specified in RuntimeDirectory= are removed when the system is rebooted.
|
||||
RuntimeDirectoryPreserve = true;
|
||||
|
||||
ExecStart = "${pkgs.python3.withPackages my-python-packages}/bin/netcup-dns --cache-directory /run/netcup-dns";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user