added example of service and timer file that each hour checks if a map file is 3 hours old and then deletes it

This commit is contained in:
christian 2021-06-18 16:23:27 +02:00
parent 515cb391a9
commit 17a9c52b20
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[Unit]
Description=Deleting files from places after a certain amount of days
[Service]
Type=simple
User=autismbot1
ExecStart=find "/home/autismbot1/.steam/debian-installation/steamapps/common/Counter-Strike Source/cstrike/download/maps" -maxdepth 1 -mmin +179 -type f -delete

View File

@ -0,0 +1,9 @@
[Unit]
Description=Runs the maps Cleaner once each 10 hours
Requires=clean_maps1.service
[Timer]
OnCalendar=00/1:00
[Install]
WantedBy=multi-user.target