From 797d7a27330c69d63ceaac5c2ddcc014a261ab1b Mon Sep 17 00:00:00 2001 From: Philippe Kueck Date: Fri, 7 Oct 2016 10:44:59 +0200 Subject: [PATCH] acme.sh fails if the target path does not exist --- acme.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/acme.sh b/acme.sh index 70f5f593..6f6fd80d 100755 --- a/acme.sh +++ b/acme.sh @@ -2897,7 +2897,7 @@ _installcert() { if [ -f "$Le_RealCertPath" ] && [ ! "$IS_RENEW" ] ; then cp "$Le_RealCertPath" "$Le_RealCertPath".bak fi - cat "$CERT_PATH" > "$Le_RealCertPath" + install -D "$CERT_PATH" "$Le_RealCertPath" fi if [ "$Le_RealCACertPath" ] ; then @@ -2910,7 +2910,7 @@ _installcert() { if [ -f "$Le_RealCACertPath" ] && [ ! "$IS_RENEW" ] ; then cp "$Le_RealCACertPath" "$Le_RealCACertPath".bak fi - cat "$CA_CERT_PATH" > "$Le_RealCACertPath" + install -D "$CA_CERT_PATH" "$Le_RealCACertPath" fi fi @@ -2921,7 +2921,7 @@ _installcert() { if [ -f "$Le_RealKeyPath" ] && [ ! "$IS_RENEW" ] ; then cp "$Le_RealKeyPath" "$Le_RealKeyPath".bak fi - cat "$CERT_KEY_PATH" > "$Le_RealKeyPath" + install -D "$CERT_KEY_PATH" "$Le_RealKeyPath" fi if [ "$Le_RealFullChainPath" ] ; then @@ -2930,7 +2930,7 @@ _installcert() { if [ -f "$Le_RealFullChainPath" ] && [ ! "$IS_RENEW" ] ; then cp "$Le_RealFullChainPath" "$Le_RealFullChainPath".bak fi - cat "$CERT_FULLCHAIN_PATH" > "$Le_RealFullChainPath" + install -D "$CERT_FULLCHAIN_PATH" "$Le_RealFullChainPath" fi if [ "$Le_ReloadCmd" ] ; then