Switch command order

So that files definitely expore even if the sql access fails
This commit is contained in:
Bob Mottram 2017-07-09 17:19:26 +01:00
parent 3b5170c70a
commit 5d872f0204
3 changed files with 5 additions and 5 deletions

View File

@ -376,7 +376,7 @@ function backup_local_gnusocial {
fi
# don't backup more data than we need to
gnusocial-expire-posts
gnusocial-expire
source_directory=/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/backup
if [ ! -d $source_directory ]; then
@ -456,7 +456,7 @@ function backup_remote_gnusocial {
fi
# don't backup more data than we need to
gnusocial-expire-posts
gnusocial-expire
source_directory=/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/backup
if [ ! -d $source_directory ]; then

View File

@ -392,7 +392,7 @@ function backup_local_postactiv {
fi
# don't backup more data than we need to
postactiv-expire-posts
postactiv-expire
source_directory=/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/backup
if [ ! -d $source_directory ]; then
@ -472,7 +472,7 @@ function backup_remote_postactiv {
fi
# don't backup more data than we need to
postactiv-expire-posts
postactiv-expire
source_directory=/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/backup
if [ ! -d $source_directory ]; then

View File

@ -790,8 +790,8 @@ function expire_gnusocial_posts {
gnusocial_expire_script=/usr/bin/${gnusocial_type}-expire
echo '#!/bin/bash' > $gnusocial_expire_script
echo "/usr/bin/php $gnusocial_expire_posts_script" >> $gnusocial_expire_script
echo "find /var/www/${domain_name}/htdocs/file/* -mtime +${expire_days} -exec rm {} +" >> $gnusocial_expire_script
echo "/usr/bin/php $gnusocial_expire_posts_script" >> $gnusocial_expire_script
chmod +x $gnusocial_expire_script
# Add a cron job