On Fri, Mar 15, 2019 at 02:41:22PM -0000, Jonathan Kamens wrote: > >You should be able to remove or edit /etc/cron.d/certbot, and by policy > packaging is required to respect your change. Does this not work? > > Yes, this appears to work (at least, after removing the file, `apt-get > install --reinstall python3-certbot` on disco doesn't recreate it), but > as I understand it, this is a non-standard mechanism for disabling a > cron job. In the past the standard mechanism has been to include a > variable in /etc/default/[whatever] to indicate whether the cron job > should run.
It is a standard mechanism for packages to provide tunables in /etc/default/<package>. However I'm not sure this has ever been the case for cron jobs. Could you provide some examples, specifically for cron jobs, of your "standard mechanism" assertion in popular packages that ship cron jobs? In any case, I see that as optional. It's a reasonable feature request to add an additional disabling mechanism, but expecting the sysadmin to edit something else in /etc is equally valid. > I don't want to delete files from the source package. What happens if I > decide to switch back to the packager's version of the cron job later, > but the file is gone because I deleted it to prevent it from running? Keep a backup of the file if you like, or edit it to comment out the line in question. I'd have to check in the case of deletion, but for an edited file if the packager changes their version, you'll usually be given the option (if interactive) of adopting it, and will end up with a <package>.dpkg-new file if not. Editing /etc *is* the standard mechanism on Debian and derivatives. Preserving sysadmin changes to files in /etc is explicitly set aside in Debian policy as mandatory for packages, and package maintainers sometimes have to go to extraordinary lengths to comply. Deleting or changing these files is safe and is a supported mechanism. > >(and similarly you should be able to disable the systemd certbot.timer > using systemd's usual mechanisms, and this change should also be > preserved by packaging) > > I suppose this is actually the correct answer in the age of systemd. Note that on Ubuntu, systemd is the only supported init system (from 16.04 onwards), and the cron job is inactive if systemd is running. So the mechanism of disabling the cron job as we discussed above is moot, unless I missed something? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1706409 Title: should be possible to disable certbot cron job To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-certbot/+bug/1706409/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs