bassmaster187 / TeslaLogger

TeslaLogger is a self hosted data logger for your Tesla Model S/3/X/Y. Actually it supports RaspberryPi 3B, 3B+, 4B, Docker and Synology NAS.
https://www.teslalogger.de
GNU General Public License v3.0
518 stars 171 forks source link

Cleanup of logfile only if backup was created successfully #1327

Open KapUttyy opened 4 months ago

KapUttyy commented 4 months ago

Checking if this months backup of the logfile already exists. If not copying and zipping of logfile. If zipped logfile is created successfully, copy of logfile will be erased and nohup.out gets cleaned up.

Not every run of the script if it is the first day of the month.

Please review before merging as I am not a shell script guy ;-)

rowich commented 3 months ago

Didn't saw this before. Might be overlapping with my pull request: https://github.com/bassmaster187/TeslaLogger/pull/1344

I made a similar change, but more complex to cleanup stuff, but have yearly backups still available.