shermand100 / PiNodeXMR

Monero Node for Single Board Computers with Web Interface and additional tools pre-configured. Self Installing.
GNU General Public License v3.0
213 stars 40 forks source link

Weekly log clean complains about missing files #100

Open Depfrost opened 1 year ago

Depfrost commented 1 year ago

I have noticed that the script /home/pinodexmr/weekly-log-clean.sh , scheduled to run every Sunday at 12pm with cron produces a lot of these error messages:

rm: cannot remove '/home/pinodexmr/p2pool/build/p2pool.log': No such file or directory
rm: cannot remove '/home/pinodexmr/*dialog*': No such file or directory

Occasionally I also get this message: rm: cannot remove '/home/pinodexmr/.bitmonero/*bitmonero.log*': No such file or directory

I have setup a mail server on my pi4 and it has sent 60 emails (1 email every minute from 12h to 13h) with this message to pinodexmr@mydomain.com ^^'

One solution could be to run this script via cron once a week, instead of 60 times a week: 0 12 * * 7 /home/pinodexmr/weekly-log-clean.sh instead of * 12 * * 7 /home/pinodexmr/weekly-log-clean.sh

Another solution could be to check if theses files exist before attempting to remove them?

I hope this helps, thank you for this amazing project and developing the monero ecosystem!