#--------------------------------------------------------------------------- # /usr/lib/systemd/system/mlocate.service - service unit # # Creation: 2023-05-17 hbfl # Last Update: $Id$ # # Copyright (c) 2011-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)net # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #----------------------------------------------------------------------- [Unit] Description=Update locate database [Service] # added automatically, for details please see # https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ProtectSystem=full ProtectHome=read-only PrivateDevices=true ProtectHostname=true ProtectClock=true ProtectKernelTunables=true ProtectKernelLogs=true ProtectControlGroups=true RestrictRealtime=true # end of automatic additions Type=oneshot ExecStart=/bin/sh -c \ "chown -R ${RUN_UPDATEDB_AS}:root /var/lib/mlocate && \ su --shell=/bin/sh ${RUN_UPDATEDB_AS} -c 'umask 0022; /usr/bin/updatedb'" # Ensure we have proper umask bnc#941296 UMask=0022 # Alter the priority of the updatedb process Nice=19 IOSchedulingClass=2 IOSchedulingPriority=7 # Load sysconfig EnvironmentFile=/etc/sysconfig/mlocate