Explorar el Código

* configurarBackups(): cambios en cron.d
* instalarLetsEncrypt(): cambios en cron.d

Guzmán Castanedo Villalba hace 6 años
padre
commit
df62a977d6
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      install

+ 3 - 3
install

@@ -1268,11 +1268,11 @@ instalarLetsEncrypt() {
 		cp -f ./var/certbot /usr/bin/certbot 2>/dev/null
 		comprobarError $? 401
 		# Configurar /etc/cron.d/certbot para renovar automáticamente los certificados
-		echo -en "# certbot autorenew of the certificates twice a day\n" > /etc/cron.d/certbot
+		echo -en "# /etc/cron.d/certbot: certbot autorenew the certificates twice a day\n" > /etc/cron.d/certbot
 		echo -en "SHELL=/bin/sh\n" >> /etc/cron.d/certbot
 		echo -en "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n\n" >> /etc/cron.d/certbot
 		echo -en "# Job start twice per day (4am & 2pm) in a random minute" >> /etc/cron.d/certbot
-		echo -en "0 4,14 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew\n" >> /etc/cron.d/certbot
+		echo -en "0 4,14 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew\n" >> /etc/cron.d/certbot
 	fi
 }
 
@@ -1759,7 +1759,7 @@ configurarBackups() {
 		fi
 		echo -en "# /etc/cron.d/backup-server: crontab for $hostname\n\n" > /etc/cron.d/backup-server
 		echo -en "# Backup every day at 4:00 am\n" >> /etc/cron.d/backup-server
-		echo -en "0 4 * * * root [ -x /usr/bin/backup-server ] && /usr/bin/backup-server --xz -u $webServerUser -g $webServerGroup --no-encryption --sql-user $sqlPasswd --nginx-dir /etc/$webServerName $letsEncryptCode--no-mail --no-gogs --no-postfix --no-dovecot --no-opendkim --no-spf --no-opendmarc --no-amavis --no-spamassasin /var/backup >> /var/log/backup-server.log 2>&1" >> /etc/cron.d/backup-server
+		echo -en "0 4 * * * root [ -x /usr/bin/backup-server ] && /usr/bin/backup-server --xz -u $webServerUser -g $webServerGroup --no-encryption --sql-user root --sql-pass $sqlPasswd --nginx-dir /etc/$webServerName $letsEncryptCode--no-mail --no-gogs --no-postfix --no-dovecot --no-opendkim --no-spf --no-opendmarc --no-amavis --no-spamassassin /var/backup >> /var/log/backup-server.log 2>&1" >> /etc/cron.d/backup-server
 		comprobarError $? 701
 	fi
 	unset letsEncryptCode