Improve Bluetooth cache cleanup command (#2906)

Use the find's delete flag to delete the files instead of spanning a
shell for each file.
This commit is contained in:
Stefan Agner 2023-11-06 11:52:57 +01:00 committed by GitHub
parent fccb11cad1
commit 1a6b7418f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ Description=Remove Bluetooth cache entries older than one week
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'find /var/lib/bluetooth/*/cache -mindepth 1 -type f -atime +7 -exec rm {} \;'
ExecStart=/bin/sh -c 'find /var/lib/bluetooth/*/cache -mindepth 1 -type f -atime +7 -delete'
PrivateDevices=yes
PrivateNetwork=yes
PrivateUsers=no