update path for certbot to be in /usr/local/bin

This commit is contained in:
Matthew Saunders Brown 2024-10-14 12:31:05 -07:00
parent d28dce2d08
commit 72b71bf27c
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@ SHELL=/bin/sh
PATH=/opt/certbot/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin PATH=/opt/certbot/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Renew certs twice daily # Renew certs twice daily
0 0,12 * * * root test -x /opt/certbot/bin/certbot && test -L /usr/bin/certbot && perl -e 'sleep int(rand(43200))' && certbot -q renew --no-random-sleep-on-renew 0 0,12 * * * root test -x /opt/certbot/bin/certbot && test -L /usr/local/bin/certbot && perl -e 'sleep int(rand(43200))' && certbot -q renew --no-random-sleep-on-renew
# Upgrade certbot monthly # Upgrade certbot monthly
43 0 1 * * root /opt/certbot/bin/pip install --upgrade --quiet pip 43 0 1 * * root /opt/certbot/bin/pip install --upgrade --quiet pip

View File

@ -40,7 +40,8 @@ DEBIAN_FRONTEND=noninteractive apt-get -y install python3-pip python3-wheel pyth
python3 -m venv /opt/certbot python3 -m venv /opt/certbot
/opt/certbot/bin/pip install --upgrade pip /opt/certbot/bin/pip install --upgrade pip
/opt/certbot/bin/pip install certbot certbot-apache /opt/certbot/bin/pip install certbot certbot-apache
ln -s /opt/certbot/bin/certbot /usr/bin/certbot ln -s /opt/certbot/bin/certbot /usr/local/bin/certbot
ln -s certbot /usr/local/bin/letsencrypt
cp etc/cron.d/certbot /etc/cron.d/certbot cp etc/cron.d/certbot /etc/cron.d/certbot
chmod 644 /etc/cron.d/certbot chmod 644 /etc/cron.d/certbot