1

Topic: Sogo backup script error

Hello!

We are monitoring all of the scheduled scripts and their exit codes in our mail server and we realized that the sogo backup script (/var/vmail/backup/backup_sogo.sh) sometimes exits with exit code 1 which generates an alert for us.

The reason of the error is the following lines from the end of the script:

# Try to remove empty directory.
rmdir ${REMOVED_BACKUP_MONTH_DIR} 2>/dev/null
rmdir ${REMOVED_BACKUP_YEAR_DIR} 2>/dev/null

When the related directories are empty there is no problem but if the rmdir can't remove the non-empty directory it returns with 1 and there is no additional exit code after that in the script so it will exit with exit code 1 too.

We temporary corrected this in our instance but could you fix this in the next release please? We would prefer to use the original scripts to avoid any problems.

Thank you for your help!
Best regards,
Adam

2

Re: Sogo backup script error

Simply appending line "exit 0" at the end of file should work for you.
I will add this fix too.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Sogo backup script error

Fixed: https://github.com/iredmail/iRedMail/co … 89a86bf688

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee