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 mkdir -p /var/lib/wo
if [ -f /var/lib/ee/ee.db ]; then 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 cp /var/lib/ee/ee.db /var/lib/wo/dbase-ee.db
### # Copy ee database
# Clean WO installation
###
cp /var/lib/ee/ee.db /var/lib/wo/dbase.db cp /var/lib/ee/ee.db /var/lib/wo/dbase.db
else else
if [ -d /etc/nginx/sites-available ]; then
# Create an empty database for WordOps # Create an empty database for WordOps
echo "CREATE TABLE sites ( 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 VALUES (\"$site\", \"$wo_site_current\", \"$wo_site_current_cache\", \"$wo_webroot\", \"$wo_site_status\", 0, 'ext4', 'mysql');" | sqlite3 /var/lib/wo/dbase.db
done done
fi
fi fi
# echo "UPDATE sites SET php_version = REPLACE(php_version, '5.6', '7.2');" | sqlite3 /var/lib/wo/dbase.db # echo "UPDATE sites SET php_version = REPLACE(php_version, '5.6', '7.2');" | sqlite3 /var/lib/wo/dbase.db