Only update ssl.conf if it exists

tags/dehydrated-0.5.0-11
Daniel Berteaud 6 years ago
parent 4681b9ecd7
commit 2b6d391473
  1. 4
      dehydrated.spec

@ -120,7 +120,9 @@ fi
if [ -d %{_localstatedir}/lib/letsencrypt.sh/certificates/certs ]; then
mv %{_localstatedir}/lib/letsencrypt.sh/certificates/* %{_localstatedir}/lib/%{name}/certificates/
fi
sed -i -e 's|%{_localstatedir}/lib/letsencrypt.sh|%{_localstatedir}/lib/%{name}|g' %{_sysconfdir}/httpd/conf.d/ssl.conf
if [ -e %{_sysconfdir}/httpd/conf.d/ssl.conf ]; then
sed -i -e 's|%{_localstatedir}/lib/letsencrypt.sh|%{_localstatedir}/lib/%{name}|g' %{_sysconfdir}/httpd/conf.d/ssl.conf
fi
if [ -d %{_sysconfdir}/letsencrypt.sh/hooks_deploy_cert.d/ ]; then
find %{_sysconfdir}/letsencrypt.sh/hooks_deploy_cert.d/ -type f -perm /111 -exec mv "{}" %{_sysconfdir}/%{name}/hooks_deploy_cert.d/ \;
fi

Loading…
Cancel
Save