Tidying
This commit is contained in:
parent
7ff57a6f76
commit
ba8f72ad91
|
@ -8318,6 +8318,8 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
# Ensure that the database gets backed up locally, if remote
|
||||
# backups are not being used
|
||||
backup_databases_script_header
|
||||
|
||||
if ! grep -q "GNU Social" /usr/bin/backupdatabases; then
|
||||
echo '' >> /usr/bin/backupdatabases
|
||||
echo $'# Backup the GNU Social database' >> /usr/bin/backupdatabases
|
||||
echo 'TEMPFILE=/root/gnusocial.sql' >> /usr/bin/backupdatabases
|
||||
|
@ -8344,7 +8346,9 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
echo ' # Make the backup readable only by root' >> /usr/bin/backupdatabases
|
||||
echo ' chmod 600 $DAILYFILE' >> /usr/bin/backupdatabases
|
||||
echo 'fi' >> /usr/bin/backupdatabases
|
||||
fi
|
||||
|
||||
if ! grep -q "GNU Social" /etc/cron.weekly/backupdatabasesweekly; then
|
||||
echo '' >> /etc/cron.weekly/backupdatabasesweekly
|
||||
echo $'# GNU Social' >> /etc/cron.weekly/backupdatabasesweekly
|
||||
echo 'if [ -f /var/backups/gnusocial_weekly.sql ]; then' >> /etc/cron.weekly/backupdatabasesweekly
|
||||
|
@ -8353,7 +8357,9 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
echo 'if [ -f /var/backups/gnusocial_daily.sql ]; then' >> /etc/cron.weekly/backupdatabasesweekly
|
||||
echo ' cp -f /var/backups/gnusocial_daily.sql /var/backups/gnusocial_weekly.sql' >> /etc/cron.weekly/backupdatabasesweekly
|
||||
echo 'fi' >> /etc/cron.weekly/backupdatabasesweekly
|
||||
fi
|
||||
|
||||
if ! grep -q "GNU Social" /etc/cron.monthly/backupdatabasesmonthly; then
|
||||
echo '' >> /etc/cron.monthly/backupdatabasesmonthly
|
||||
echo $'# GNU Social' >> /etc/cron.monthly/backupdatabasesmonthly
|
||||
echo 'if [ -f /var/backups/gnusocial_monthly.sql ]; then' >> /etc/cron.monthly/backupdatabasesmonthly
|
||||
|
@ -8362,6 +8368,7 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
echo 'if [ -f /var/backups/gnusocial_weekly.sql ]; then' >> /etc/cron.monthly/backupdatabasesmonthly
|
||||
echo ' cp -f /var/backups/gnusocial_weekly.sql /var/backups/gnusocial_monthly.sql' >> /etc/cron.monthly/backupdatabasesmonthly
|
||||
echo 'fi' >> /etc/cron.monthly/backupdatabasesmonthly
|
||||
fi
|
||||
|
||||
if ! grep -q "gnusocial" /etc/cron.hourly/repair; then
|
||||
echo "${PROJECT_NAME}-repair-database gnusocial" >> /etc/cron.hourly/repair
|
||||
|
|
Loading…
Reference in New Issue