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

Reinstalling pkg_comp-cron adds semi-duplicate entry to crontab #8

Open
truist opened this issue Mar 8, 2017 · 2 comments
Open

Reinstalling pkg_comp-cron adds semi-duplicate entry to crontab #8

truist opened this issue Mar 8, 2017 · 2 comments

Comments

@truist
Copy link

truist commented Mar 8, 2017

Twice now I've uninstalled pkg_comp-cron and reinstalled it, and later realized that it has re-added the @daily cron task. I change it to @Weekly, so I end up with it configured twice.

It's not really surprising that it does that, but it would be nice if it would e.g. check if anything in the crontab already had pkg_comp4cron in it, and just skipped adding it again.

@jmmv
Copy link
Owner

jmmv commented Mar 9, 2017

Well, it's a little bit surprising. The logic to detect if the job is already configured or not should be pretty permissive regarding the crontab contents, as it only looks for a combination of pkg_comp4cron and the default configuration file. Changes to the timespec should not affect this.

Was @daily to @weekly the only thing you changed?

See CRONTAB_RE in pkgsrc/pkgtools/pkg_comp-cron/INSTALL for details on how this is checked.

@truist
Copy link
Author

truist commented Mar 9, 2017

Ah, that's the issue. I don't use the default configuration path. (I standardize all the config into /etc.)

Is that part of the check really necessary? I can't think of a case where it is better than just checking for pkg_comp4cron.

This raises another issue - each time I reinstall pkg_comp-cron, I have to re-delete the config files it installs. Maybe a better model would be to install "sample" config files in e.g. share/ and just explain where to find them and where to put them? That would also help fix the confusion about the config files installed in /etc (from pkg_comp).

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

No branches or pull requests

2 participants