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