]> jfr.im git - erebus.git/commitdiff
fix find to trim oldlogs
authorJohn Runyon <redacted>
Wed, 1 Nov 2023 20:50:52 +0000 (14:50 -0600)
committerJohn Runyon <redacted>
Wed, 1 Nov 2023 20:50:52 +0000 (14:50 -0600)
.gitignore
README.md
oldlogs/.gitignore [deleted file]
oldlogs/.keep [new file with mode: 0644]

index edb2ec0bb06bf28a91ebc1715e379536ed760b5f..620d76ea3550a88f620f4bee27430224fd2a1f2a 100644 (file)
@@ -8,3 +8,4 @@ bot.config
 nohup.out
 pidfile
 logfile
+oldlogs/
index 521314d23fc418a24baa3f348cbd3b5667e2a292..497662d9ccd1069de6508193798297ce9538b768 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ Install croncheck.sh in your crontab, if desired.
 `* * * * * /path/to/erebus/croncheck.sh`  
 To suppress croncheck.sh from restarting the bot without removing from crontab, `touch dontstart`
 
-Output will be placed in `logfile`, which is rotated to `oldlogs/`. (I strongly recommend `rm oldlogs/*` as a weekly crontab entry. `@weekly find /path/to/erebus/oldlogs/ -mtime 7 -execdir rm '{}' +`)
+Output will be placed in `logfile`, which is rotated to `oldlogs/`. (I strongly recommend `rm oldlogs/*` as a weekly crontab entry. `@weekly find /path/to/erebus/oldlogs/ -mtime +7 '!' -name .keep -delete`)
 
 The bot targets Python 3 only. It has some time ago switched to being primarily tested on Python 3.
 Python 2 support is presumed to have slowly eroded due to a lack of testing. It probably won't work.
diff --git a/oldlogs/.gitignore b/oldlogs/.gitignore
deleted file mode 100644 (file)
index d6b7ef3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/oldlogs/.keep b/oldlogs/.keep
new file mode 100644 (file)
index 0000000..e69de29