mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-11-04 12:28:12 +00:00 
			
		
		
		
	Merge pull request #118 from BlueAnanas/fix2
Fix broken certificate backup in installcert when RealCACertPath == RealCertPath
This commit is contained in:
		
						commit
						625a899504
					
				
							
								
								
									
										6
									
								
								le.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								le.sh
									
									
									
									
									
								
							@ -1363,13 +1363,13 @@ installcert() {
 | 
			
		||||
  fi
 | 
			
		||||
  
 | 
			
		||||
  if [ "$Le_RealCACertPath" ] ; then
 | 
			
		||||
    if [ -f "$Le_RealCACertPath" ] ; then
 | 
			
		||||
      cp -p "$Le_RealCACertPath" "$Le_RealCACertPath".bak
 | 
			
		||||
    fi
 | 
			
		||||
    if [ "$Le_RealCACertPath" == "$Le_RealCertPath" ] ; then
 | 
			
		||||
      echo "" >> "$Le_RealCACertPath"
 | 
			
		||||
      cat "$CA_CERT_PATH" >> "$Le_RealCACertPath"
 | 
			
		||||
    else
 | 
			
		||||
      if [ -f "$Le_RealCACertPath" ] ; then
 | 
			
		||||
        cp -p "$Le_RealCACertPath" "$Le_RealCACertPath".bak
 | 
			
		||||
      fi
 | 
			
		||||
      cat "$CA_CERT_PATH" > "$Le_RealCACertPath"
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user