Add ln --force option for certbot cli

This commit is contained in:
2025-12-31 17:33:04 +01:00
parent 554e032bd6
commit 2dd07a703f

View File

@@ -30,7 +30,7 @@ if [ $1 == 1 ]; then
# Create virutal env with certbot cli # Create virutal env with certbot cli
%{_bindir}/env python3 -m venv /opt/certbot %{_bindir}/env python3 -m venv /opt/certbot
/opt/certbot/bin/pip install --upgrade pip certbot certbot-dns-ovh /opt/certbot/bin/pip install --upgrade pip certbot certbot-dns-ovh
%{_bindir}/env ln --symbolic --target-directory %{_sbindir} /opt/certbot/bin/certbot %{_bindir}/env ln --symbolic --force --target-directory %{_sbindir} /opt/certbot/bin/certbot
%{_bindir}/env certbot certonly --non-interactive --agree-tos --email samuel.campos@netoik.io --dns-ovh --dns-ovh-credentials "%{_sysconfdir}/%{name}/ovh.ini" -d "*.netoik.io" -d "*.samuel-campos.fr" %{_bindir}/env certbot certonly --non-interactive --agree-tos --email samuel.campos@netoik.io --dns-ovh --dns-ovh-credentials "%{_sysconfdir}/%{name}/ovh.ini" -d "*.netoik.io" -d "*.samuel-campos.fr"
%{_bindir}/env printf "\nAutomatic certbot renew\n0 12 * * * root sleep $((RANDOM % 3600)) && certbot renew -q\n" >> %{_sysconfdir}/crontab %{_bindir}/env printf "\nAutomatic certbot renew\n0 12 * * * root sleep $((RANDOM % 3600)) && certbot renew -q\n" >> %{_sysconfdir}/crontab
fi fi