Remove empty lines

This commit is contained in:
Bob Mottram 2016-11-02 17:51:21 +00:00
parent 2939cfa1f6
commit 4c66ac644c
1 changed files with 0 additions and 3 deletions

View File

@ -54,7 +54,6 @@ function backup_database_local {
backup_databases_script=/usr/bin/backupdatabases backup_databases_script=/usr/bin/backupdatabases
if ! grep -q "# Backup the ${database_name} database" $backup_databases_script; then if ! grep -q "# Backup the ${database_name} database" $backup_databases_script; then
echo '' >> $backup_databases_script
echo "# Backup the ${database_name} database" >> $backup_databases_script echo "# Backup the ${database_name} database" >> $backup_databases_script
echo "TEMPFILE=/root/${database_name}.sql" >> $backup_databases_script echo "TEMPFILE=/root/${database_name}.sql" >> $backup_databases_script
echo 'DAILYFILE=/var/backups/${database_name}_daily.sql' >> $backup_databases_script echo 'DAILYFILE=/var/backups/${database_name}_daily.sql' >> $backup_databases_script
@ -85,7 +84,6 @@ function backup_database_local {
weekly_backup_script=/etc/cron.weekly/backupdatabasesweekly weekly_backup_script=/etc/cron.weekly/backupdatabasesweekly
if ! grep -q "Backup ${database_name}" ${weekly_backup_script}; then if ! grep -q "Backup ${database_name}" ${weekly_backup_script}; then
echo '' >> ${weekly_backup_script}
echo "# Backup ${database_name}" >> ${weekly_backup_script} echo "# Backup ${database_name}" >> ${weekly_backup_script}
echo "if [ -f /var/backups/${database_name}_weekly.sql ]; then" >> ${weekly_backup_script} echo "if [ -f /var/backups/${database_name}_weekly.sql ]; then" >> ${weekly_backup_script}
echo " cp -f /var/backups/${database_name}_weekly.sql /var/backups/${database_name}_2weekly.sql" >> ${weekly_backup_script} echo " cp -f /var/backups/${database_name}_weekly.sql /var/backups/${database_name}_2weekly.sql" >> ${weekly_backup_script}
@ -98,7 +96,6 @@ function backup_database_local {
monthly_backup_script=/etc/cron.monthly/backupdatabasesmonthly monthly_backup_script=/etc/cron.monthly/backupdatabasesmonthly
if ! grep -q "Backup ${database_name}" ${monthly_backup_script}; then if ! grep -q "Backup ${database_name}" ${monthly_backup_script}; then
echo '' >> ${monthly_backup_script}
echo "# Backup ${database_name}" >> ${monthly_backup_script} echo "# Backup ${database_name}" >> ${monthly_backup_script}
echo "if [ -f /var/backups/${database_name}_monthly.sql ]; then" >> ${monthly_backup_script} echo "if [ -f /var/backups/${database_name}_monthly.sql ]; then" >> ${monthly_backup_script}
echo " cp -f /var/backups/${database_name}_monthly.sql /var/backups/${database_name}_2monthly.sql" >> ${monthly_backup_script} echo " cp -f /var/backups/${database_name}_monthly.sql /var/backups/${database_name}_2monthly.sql" >> ${monthly_backup_script}