Fix package list

This commit is contained in:
VirtuBox
2019-08-29 23:37:23 +02:00
parent 05112d7f7d
commit 80ebc9d23d
2 changed files with 23 additions and 18 deletions

View File

@@ -872,7 +872,7 @@ else
else
wo_install | tee -ai $wo_install_log
fi
if [ -n "$(command -v nginx)" ]; then
if command_exists nginx; then
wo_lib_echo "Upgrading Nginx" | tee -ai $wo_install_log
wo_upgrade_nginx | tee -ai $wo_install_log
fi
@@ -885,7 +885,7 @@ else
wo_lib_echo "Adding systemd service tweak" | tee -ai $wo_install_log
wo_systemd_tweak | tee -ai $wo_install_log
fi
if [ -x /usr/sbin/nginx ]; then
if command_exists nginx; then
wo_nginx_tweak | tee -ai $wo_install_log
fi
if [ -d /etc/systemd/system/mariadb.service.d ]; then

View File

@@ -858,16 +858,16 @@ class WOStackController(CementBaseController):
# utils
if pargs.utils:
Log.debug(self, "Purge package variable utils")
packages = packages + [['{0}22222/htdocs/php/webgrind/'
.format(WOVariables.wo_webroot),
'{0}22222/htdocs/cache/opcache'
.format(WOVariables.wo_webroot),
'{0}22222/htdocs/cache/nginx/'
'clean.php'.format(WOVariables.wo_webroot),
'/usr/bin/pt-query-advisor',
'{0}22222/htdocs/db/anemometer'
.format(WOVariables.wo_webroot)
]]
packages = packages + ['{0}22222/htdocs/php/webgrind/'
.format(WOVariables.wo_webroot),
'{0}22222/htdocs/cache/opcache'
.format(WOVariables.wo_webroot),
'{0}22222/htdocs/cache/nginx/'
'clean.php'.format(WOVariables.wo_webroot),
'/usr/bin/pt-query-advisor',
'{0}22222/htdocs/db/anemometer'
.format(WOVariables.wo_webroot)
]
if pargs.netdata:
Log.debug(self, "Removing Netdata")
@@ -897,15 +897,20 @@ class WOStackController(CementBaseController):
if (set(["nginx-custom"]).issubset(set(apt_packages))):
WOService.stop_service(self, 'nginx')
if (set(["fail2ban"]).issubset(set(apt_packages))):
WOService.stop_service(self, 'fail2ban')
# Netdata uninstaller
if (set(['/var/lib/wo/tmp/'
'kickstart.sh']).issubset(set(packages))):
WOShellExec.cmd_exec(self, "bash /opt/netdata/usr/"
"libexec/netdata-"
"uninstaller.sh -y -f")
if (set(["fail2ban"]).issubset(set(apt_packages))):
WOService.stop_service(self, 'fail2ban')
if WOVariables.wo_distro == 'Raspbian':
WOShellExec.cmd_exec(self, "bash /usr/"
"libexec/netdata-"
"uninstaller.sh -y -f")
else:
WOShellExec.cmd_exec(self, "bash /opt/netdata/usr/"
"libexec/netdata-"
"uninstaller.sh -y -f")
if (apt_packages):
Log.info(self, "Purging packages, please wait...")