Explorar el Código

* Fix bug $letsencryptDir var
* Bug remolve old files (find fail)

Guzmán Castanedo Villalba hace 6 años
padre
commit
5c6adeef3c
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      backup-server

+ 2 - 2
backup-server

@@ -251,7 +251,7 @@ function makep7zip {
 	#Copy Certificates (LetsEncrypt)
 	if [ $noLetsencrypt = false ];then
 		printf "Compressing:\t%s\n" $letsencryptDir
-		7z a -t7z -mx=9 $encrypt7z $backupOutput $letsEncryptDir > /dev/null
+		7z a -t7z -mx=9 $encrypt7z $backupOutput $letsencryptDir > /dev/null
 		if [ $? != 0 ];then
 			printf "WARNING:\tError copying Let's Encrypt certificates (Continue)\n"
 		fi
@@ -1156,7 +1156,7 @@ chmod $permisionMask $backupOutput
 #Remove files older than 15 days
 if [ $removeOld = true ];then
 	printf "Deletting old backups (+15 days)..."
-	find $backupDir -mindepth 1 -maxdepth 1 -mtime +$deleteDays -type f -iname $backupPrefix*$ext -delete
+	find $backupDir -mindepth 1 -maxdepth 1 -mtime +$deleteDays -type f -iname "$backupPrefix*$ext" -delete
 	if [ $? != 0 ];then
 		printf "\nWARNING:\tImposible to delete old backups (+%s days)\n" $deleteDays
 	fi