From 812ce4d302f37acd368dd5c39e5c9b34d8e6e6cd Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 15 Nov 2022 00:02:44 +0100 Subject: gitolite: add git-fsck script --- roles/gitolite/base/templates/git-fsck@.service.j2 | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 roles/gitolite/base/templates/git-fsck@.service.j2 (limited to 'roles/gitolite/base/templates/git-fsck@.service.j2') diff --git a/roles/gitolite/base/templates/git-fsck@.service.j2 b/roles/gitolite/base/templates/git-fsck@.service.j2 new file mode 100644 index 00000000..51bf43d9 --- /dev/null +++ b/roles/gitolite/base/templates/git-fsck@.service.j2 @@ -0,0 +1,29 @@ +[Unit] +Description=Git fsck for gitolite instance %i + +[Service] +Type=oneshot +ExecStart={{ gitolite_base_path }}/git-fsck.sh %i +TimeoutStartSec=10m + +# systemd hardening-options +AmbientCapabilities=CAP_DAC_READ_SEARCH +CapabilityBoundingSet=CAP_DAC_READ_SEARCH +DeviceAllow=/dev/null rw +DevicePolicy=strict +LockPersonality=true +MemoryDenyWriteExecute=true +NoNewPrivileges=true +PrivateDevices=true +PrivateTmp=true +ProtectControlGroups=true +ProtectHome=yes +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectSystem=strict +ReadWritePaths=/var/lib/prometheus-node-exporter/textfile-collector +RemoveIPC=true +RestrictNamespaces=true +RestrictRealtime=true +RestrictAddressFamilies=AF_UNIX +SystemCallArchitectures=native -- cgit v1.2.3