From ecf165ea2eddd835f2f49e40630e05c822ca047a Mon Sep 17 00:00:00 2001 From: samuel Date: Tue, 30 Dec 2025 16:09:50 +0100 Subject: [PATCH] Use env command --- netoik-rp.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/netoik-rp.spec b/netoik-rp.spec index d64dd7e..37e47c3 100644 --- a/netoik-rp.spec +++ b/netoik-rp.spec @@ -23,12 +23,14 @@ Install the reverse proxy called nginx with a predefined configuration and with %post if [ $1 == 1 ]; then - python3 -m venv /opt/certbot + %{_bindir}/env envsubst < %{_sysconfdir}/certbot/ovh.ini.tpl > %{_sysconfdir}/certbot/ovh.ini + %{_bindir}/env chmod 600 %{_sysconfdir}/certbot/ovh.ini + %{_bindir}/env python3 -m venv /opt/certbot /opt/certbot/bin/pip install --upgrade pip certbot certbot-dns-ovh - envsubst < %{_sysconfdir}/certbot/ovh.ini.tpl > %{_sysconfdir}/certbot/ovh.ini - chmod 600 %{_sysconfdir}/certbot/ovh.ini /opt/certbot/bin/certbot certonly --dns-ovh --dns-ovh-credentials "%{_sysconfdir}/certbot/ovh.ini" -d "*.netoik.io" -d "*.samuel-campos.fr" fi +%{_bindir}/env systemctl enable nginx +%{_bindir}/env systemctl restart nginx %files %attr(644, root, root) %config %{_sysconfdir}/nginx/nginx.conf