5

I installed the python-certbot-apache package per the instructions on certbot.eff.org but can't find any entry for the cron job its supposed to set up.

The Certbot packages on your system come with a cron job that will renew your certificates automatically before they expire. Since Let's Encrypt certificates last for 90 days, it's highly advisable to take advantage of this feature. From: https://certbot.eff.org/#debianjessie-apache

Where do I find this cron job? I've tried 'crontab -l', with and without sudo both, with no luck.

I understand how to run the cron job to renew the cert; my question is: where is the cron job that this package installed? Did it install?

9

In any Debian derivate, to list the files installed for a package you usually do dpkg -L.

So in your case:

dpkg -L python-certbot-apache 

This is give you the list of all files installed, and where.

You can also request the list of files from packages.debian.org

From https://packages.debian.org/stretch/all/python-certbot-apache/filelist

/usr/lib/python2.7/dist-packages/certbot_apache-0.10.2.egg-info/PKG-INFO
/usr/lib/python2.7/dist-packages/certbot_apache-0.10.2.egg-info/dependency_links.txt
/usr/lib/python2.7/dist-packages/certbot_apache-0.10.2.egg-info/entry_points.txt
/usr/lib/python2.7/dist-packages/certbot_apache-0.10.2.egg-info/requires.txt
/usr/lib/python2.7/dist-packages/certbot_apache-0.10.2.egg-info/top_level.txt
/usr/lib/python2.7/dist-packages/certbot_apache/__init__.py
/usr/lib/python2.7/dist-packages/certbot_apache/augeas_configurator.py
/usr/lib/python2.7/dist-packages/certbot_apache/augeas_lens/httpd.aug
/usr/lib/python2.7/dist-packages/certbot_apache/centos-options-ssl-apache.conf
/usr/lib/python2.7/dist-packages/certbot_apache/configurator.py
/usr/lib/python2.7/dist-packages/certbot_apache/constants.py
/usr/lib/python2.7/dist-packages/certbot_apache/display_ops.py
/usr/lib/python2.7/dist-packages/certbot_apache/obj.py
/usr/lib/python2.7/dist-packages/certbot_apache/options-ssl-apache.conf
/usr/lib/python2.7/dist-packages/certbot_apache/parser.py
/usr/lib/python2.7/dist-packages/certbot_apache/tls_sni_01.py
/usr/share/doc/python-certbot-apache/changelog.Debian.gz
/usr/share/doc/python-certbot-apache/copyright

It appears there is no cron job automatic added for the package.

You also need to install the package certbot

sudo apt-get install certbot

List of files:

/etc/cron.d/certbot
/lib/systemd/system/certbot.service
/lib/systemd/system/certbot.timer
/usr/bin/certbot
/usr/bin/letsencrypt
/usr/share/doc/certbot/README.rst.gz
/usr/share/doc/certbot/changelog.Debian.gz
/usr/share/doc/certbot/changelog.gz
/usr/share/doc/certbot/copyright
/usr/share/man/man1/certbot.1.gz
/usr/share/man/man1/letsencrypt.1.gz

So from this last package, the crontab files installed are actually /etc/cron.d/certbot for crontab and you have /lib/systemd/system/certbot.service + /lib/systemd/system/certbot.timer for systemd

  • Thanks for the response. I've looked through each of the listed txt files with no mention of setting the cron job. Could it be set in one of the listed python files? I'd like to know how to view the cron job that this package installed. – T. Thomas Dec 30 '17 at 20:47
  • I've already looked through this with no luck. – T. Thomas Dec 30 '17 at 20:53
  • @T.Thomas There is another package. added to the answer. – Rui F Ribeiro Dec 30 '17 at 20:53
2

Its actually using systemd.

I used systemctl list-unit-files | grep enabled to list my running services.

It's named certbot.timer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.