Initialize wo db only if nginx installed

This commit is contained in:
VirtuBox
2019-09-20 01:13:01 +02:00
parent 71b18636f4
commit bef95a0b75

10
install
View File

@@ -279,15 +279,13 @@ wo_sync_db() {
mkdir -p /var/lib/wo
if [ -f /var/lib/ee/ee.db ]; then
# Copy the EasyEngine database
# Make a backup of the EasyEngine database
cp /var/lib/ee/ee.db /var/lib/wo/dbase-ee.db
###
# Clean WO installation
###
# Copy ee database
cp /var/lib/ee/ee.db /var/lib/wo/dbase.db
else
if [ -d /etc/nginx/sites-available ]; then
# Create an empty database for WordOps
echo "CREATE TABLE sites (
@@ -371,7 +369,7 @@ wo_sync_db() {
VALUES (\"$site\", \"$wo_site_current\", \"$wo_site_current_cache\", \"$wo_webroot\", \"$wo_site_status\", 0, 'ext4', 'mysql');" | sqlite3 /var/lib/wo/dbase.db
done
fi
fi
# echo "UPDATE sites SET php_version = REPLACE(php_version, '5.6', '7.2');" | sqlite3 /var/lib/wo/dbase.db