YunoHost-Apps / borgserver_ynh

Borg server package for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
9 stars 5 forks source link

Uhoh, somehow the lock /var/run/moulinette_yunohost.lock did not exist ... #43

Open zamentur opened 3 years ago

zamentur commented 3 years ago

Describe the bug

With several borgserver app (around 10), i receive emails from cron that failed with message: Uhoh, somehow the lock /var/run/moulinette_yunohost.lock did not exist ...

Context

Steps to reproduce

Expected behavior

We shouldn't get the error "Uhoh, somehow the lock /var/run/moulinette_yunohost.lock did not exist ..."

Logs

Jaxom99 commented 3 years ago

Same error here, with only 2 borgserver apps on my VPS, and the backup is correctly done. The first borgserver app does not have this bug.

The object of the mail is the command : cron <root@b> : Monitor yunopi2 backup ; ALERT_DELAY="$(yunohost app setting borgserver__2 alert_delay)"; [[ $(find /home/yunopi2/backup -follow -mtime -${ALERT_DELAY} -ls | wc -l) > 0 ]] || ( echo "No file has been backuped in /home/yunopi2 since ${ALERT_DELAY} days" | mail -s "[YNH] Backup missing : yunopi2" $(yunohost app setting borgserver__2 alert_mails))

And the command itself should not send mail either, since "... wc -l > 0" is true.

Thanks for looking into it :hugs: