mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-09 22:52:40 +02:00
replace rm -f; ln -s with ln -sf
This commit is contained in:
+4
-9
@@ -247,21 +247,16 @@ sign_domain() {
|
|||||||
else
|
else
|
||||||
cat "${SCRIPTDIR}/certs/${ROOTCERT}" >> "${BASEDIR}/certs/${domain}/fullchain-${timestamp}.pem"
|
cat "${SCRIPTDIR}/certs/${ROOTCERT}" >> "${BASEDIR}/certs/${domain}/fullchain-${timestamp}.pem"
|
||||||
fi
|
fi
|
||||||
rm -f "${BASEDIR}/certs/${domain}/fullchain.pem"
|
ln -sf "fullchain-${timestamp}.pem" "${BASEDIR}/certs/${domain}/fullchain.pem"
|
||||||
ln -s "fullchain-${timestamp}.pem" "${BASEDIR}/certs/${domain}/fullchain.pem"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update remaining symlinks
|
# Update remaining symlinks
|
||||||
if [ ! "${privkey}" = "privkey.pem" ]; then
|
if [ ! "${privkey}" = "privkey.pem" ]; then
|
||||||
rm -f "${BASEDIR}/certs/${domain}/privkey.pem"
|
ln -sf "privkey-${timestamp}.pem" "${BASEDIR}/certs/${domain}/privkey.pem"
|
||||||
ln -s "privkey-${timestamp}.pem" "${BASEDIR}/certs/${domain}/privkey.pem"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f "${BASEDIR}/certs/${domain}/cert.csr"
|
ln -sf "cert-${timestamp}.csr" "${BASEDIR}/certs/${domain}/cert.csr"
|
||||||
ln -s "cert-${timestamp}.csr" "${BASEDIR}/certs/${domain}/cert.csr"
|
ln -sf "cert-${timestamp}.pem" "${BASEDIR}/certs/${domain}/cert.pem"
|
||||||
|
|
||||||
rm -f "${BASEDIR}/certs/${domain}/cert.pem"
|
|
||||||
ln -s "cert-${timestamp}.pem" "${BASEDIR}/certs/${domain}/cert.pem"
|
|
||||||
|
|
||||||
# Wait for hook script to clean the challenge and to deploy cert if used
|
# Wait for hook script to clean the challenge and to deploy cert if used
|
||||||
if [[ -n "${HOOK}" ]]; then
|
if [[ -n "${HOOK}" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user