fix backup

This commit is contained in:
VirtuBox
2019-03-25 10:09:53 +01:00
parent 8ad070306b
commit 05adfefe71

15
install
View File

@@ -83,7 +83,7 @@ fi
###
wo_branch="$1"
readonly wo_log_dir=/var/log/wo/
readonly wo_backup_dir=/var/lib/wo-backup
readonly wo_backup_dir=/var/lib/wo-backup/
readonly wo_install_log=/var/log/wo/install.log
readonly wo_linux_distro=$(lsb_release -is)
readonly wo_distro_version=$(lsb_release -sc)
@@ -124,16 +124,20 @@ if [ ! -d "$wo_log_dir" ]; then
wo_lib_echo "Creating WordOps log directory, just a second..."
mkdir -p "$wo_log_dir" || wo_lib_error "Whoops - seems we are unable to create the log directory $wo_log_dir, exit status " $?
wo_lib_echo "Creating WordOps backup directory, just a second..."
mkdir -p "$wo_backup_dir" || wo_lib_error "Whoops - seems we are unable to create the backup directory $wo_backup_dir, exit status " $?
chmod -R 600 "$wo_backup_dir"
# create wordops log files
touch /var/log/wo/{wordops.log,install.log}
chmod -R 700 /var/log/wo || wo_lib_error "Whoops, there was an error setting the permissions on the WordOps log folder, exit status " $?
fi
if [ ! -d "$wo_backup_dir" ]; then
wo_lib_echo "Creating WordOps backup directory, just a second..."
mkdir -p "$wo_backup_dir" || wo_lib_error "Whoops - seems we are unable to create the backup directory $wo_backup_dir, exit status " $?
chmod -R 600 "$wo_backup_dir"
fi
###
# 2 - Setup the dependencies for installation
####
@@ -389,7 +393,6 @@ wo_install() {
}
wo_upgrade_nginx() {
{