Fix phpmyadmin
This commit is contained in:
@@ -796,6 +796,8 @@ class WOStackController(CementBaseController):
|
|||||||
if WOAptGet.is_installed(self, 'nginx-custom'):
|
if WOAptGet.is_installed(self, 'nginx-custom'):
|
||||||
Log.debug(self, "Add Nginx to apt_packages list")
|
Log.debug(self, "Add Nginx to apt_packages list")
|
||||||
apt_packages = apt_packages + WOVariables.wo_nginx
|
apt_packages = apt_packages + WOVariables.wo_nginx
|
||||||
|
else:
|
||||||
|
Log.info(self, "Nginx is not installed")
|
||||||
|
|
||||||
# PHP
|
# PHP
|
||||||
if pargs.php:
|
if pargs.php:
|
||||||
@@ -822,15 +824,20 @@ class WOStackController(CementBaseController):
|
|||||||
if WOAptGet.is_installed(self, 'redis-server'):
|
if WOAptGet.is_installed(self, 'redis-server'):
|
||||||
Log.debug(self, "Remove apt_packages variable of Redis")
|
Log.debug(self, "Remove apt_packages variable of Redis")
|
||||||
apt_packages = apt_packages + ["redis-server"]
|
apt_packages = apt_packages + ["redis-server"]
|
||||||
|
else:
|
||||||
|
Log.info(self, "Redis is not installed")
|
||||||
|
|
||||||
|
|
||||||
# MariaDB
|
# MariaDB
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
if WOAptGet.is_installed(self, 'mariadb-server'):
|
if WOAptGet.is_installed(self, 'mariadb-server'):
|
||||||
Log.debug(self, "Removing apt_packages variable of MySQL")
|
Log.debug(self, "Add MySQL to apt_packages list")
|
||||||
apt_packages = apt_packages + ['mariadb-server',
|
apt_packages = apt_packages + ['mariadb-server',
|
||||||
'mysql-common',
|
'mysql-common',
|
||||||
'mariadb-client']
|
'mariadb-client']
|
||||||
packages = packages + ['/etc/mysql', '/var/lib/mysql']
|
packages = packages + ['/etc/mysql', '/var/lib/mysql']
|
||||||
|
else:
|
||||||
|
Log.info(self, "MariaDB is not installed")
|
||||||
|
|
||||||
# mysqlclient
|
# mysqlclient
|
||||||
if pargs.mysqlclient:
|
if pargs.mysqlclient:
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ from wo.core.logging import Log
|
|||||||
from wo.core.mysql import WOMysql
|
from wo.core.mysql import WOMysql
|
||||||
from wo.core.services import WOService
|
from wo.core.services import WOService
|
||||||
from wo.core.shellexec import CommandExecutionError, WOShellExec
|
from wo.core.shellexec import CommandExecutionError, WOShellExec
|
||||||
|
from wo.core.sslutils import SSL
|
||||||
from wo.core.template import WOTemplate
|
from wo.core.template import WOTemplate
|
||||||
from wo.core.variables import WOVariables
|
from wo.core.variables import WOVariables
|
||||||
from wo.core.sslutils import SSL
|
|
||||||
|
|
||||||
|
|
||||||
def pre_pref(self, apt_packages):
|
def pre_pref(self, apt_packages):
|
||||||
@@ -1170,9 +1170,8 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
Log.info(self, "Updating phpMyAdmin, please wait...")
|
Log.info(self, "Updating phpMyAdmin, please wait...")
|
||||||
WOShellExec.cmd_exec(
|
WOShellExec.cmd_exec(
|
||||||
self, "/usr/local/bin/composer update "
|
self, "/usr/local/bin/composer update "
|
||||||
"--no-plugins --no-scripts "
|
"--no-plugins --no-scripts -n --no-dev -d "
|
||||||
"-n --no-dev -d "
|
"/var/www/22222/htdocs/db/pma/")
|
||||||
"/var/www/22222/htdocs/db/pma/ &")
|
|
||||||
WOFileUtils.chown(
|
WOFileUtils.chown(
|
||||||
self, '{0}22222/htdocs/db/pma'
|
self, '{0}22222/htdocs/db/pma'
|
||||||
.format(WOVariables.wo_webroot),
|
.format(WOVariables.wo_webroot),
|
||||||
@@ -1189,12 +1188,11 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
.format(WOVariables.wo_webroot))
|
.format(WOVariables.wo_webroot))
|
||||||
if not os.path.isfile('/var/www/22222/htdocs/cache/redis/'
|
if not os.path.isfile('/var/www/22222/htdocs/cache/redis/'
|
||||||
'phpRedisAdmin/composer.lock'):
|
'phpRedisAdmin/composer.lock'):
|
||||||
WOShellExec.cmd_exec(self, "/usr/local/bin/composer "
|
WOShellExec.cmd_exec(
|
||||||
"create-project --no-plugins "
|
self, "/usr/local/bin/composer "
|
||||||
"--no-scripts -n -s dev "
|
"create-project --no-plugins --no-scripts -n -s dev "
|
||||||
"erik-dubbelboer/php-redis-admin "
|
"erik-dubbelboer/php-redis-admin "
|
||||||
"/var/www/22222/htdocs/cache"
|
"/var/www/22222/htdocs/cache/redis/phpRedisAdmin")
|
||||||
"/redis/phpRedisAdmin &")
|
|
||||||
WOFileUtils.chown(self, '{0}22222/htdocs'
|
WOFileUtils.chown(self, '{0}22222/htdocs'
|
||||||
.format(WOVariables.wo_webroot),
|
.format(WOVariables.wo_webroot),
|
||||||
'www-data',
|
'www-data',
|
||||||
|
|||||||
Reference in New Issue
Block a user