Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logrotate cron error for prosody when it's not running #131

Closed
andrewladlow opened this issue Aug 9, 2018 · 1 comment
Closed

Logrotate cron error for prosody when it's not running #131

andrewladlow opened this issue Aug 9, 2018 · 1 comment
Labels

Comments

@andrewladlow
Copy link
Contributor

The logrotate cron will email the following warning every week if prosody isn't active:

/etc/cron.daily/logrotate:
error: error running shared postrotate script for
'/var/log/prosody/prosody.log /var/log/prosody/prosody.err '
run-parts: /etc/cron.daily/logrotate exited with return code 1

It looks like this is because the postrotate tries to check for the existence of /var/run/prosody/prosody.pid which won't be there when prosody is disabled (by default):

[ -e /var/run/prosody/prosody.pid ] && /etc/init.d/prosody reload > /dev/null

We should be able to suppress that by changing this line to e.g

/etc/init.d/prosody reload > /dev/null
@ianeiloart
Copy link

This is a bit of a hack. Suppressing output might make real errors. A better fix is to fix this such that the post rotate script checks that the service is enabled before attempting the reload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants