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

Exit status code #25

Open
jaddison opened this issue Feb 7, 2019 · 3 comments
Open

Exit status code #25

jaddison opened this issue Feb 7, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@jaddison
Copy link

jaddison commented Feb 7, 2019

This command doesn't appear to have a differing status code, depending on if it updated the database(s) or not. It would be good to return something different so a cron job statement could chain restarting services ONLY if the databases were updated.

@felixbuenemann
Copy link

Yeah, this would be great, something like geoipupdate -e && nginx -s reload.

It should be an explicit option like -e --exit to not break existing scripts.

@alvarolb
Copy link

Yes, i think this feature is necessary!

@oschwald oschwald added the enhancement New feature or request label Aug 21, 2019
@rtib
Copy link

rtib commented Apr 27, 2020

I don't think this is a good idea, by multiple reasons:

  1. If there are multiple databases configured for update, it is not clear which one got an update and which one is used by the process to be reloaded. Probably there are multiple processes using different databases.

  2. In large deployments, the update may be run on a few hosts only, which then distribute the database files to many different systems and services. These could not be notified this way.

  3. The usual interpretation of exit status is, that 0 denotes a successful, while anything else an abnormal termination.

Therefore, the approach of having processes subscribed via inotify to file changes is more reasonable and fine grained.

On the other hand, distinct error codes for different errors would make sense, e.g. for an invalid license key there should be a different exit status as for a probably temporal network connection issue. This could allow the implementation of retry mechanisms around the update tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

5 participants