Add remove and purge for composer & dashboard
This commit is contained in:
@@ -1185,6 +1185,11 @@ class WOStackController(CementBaseController):
|
|||||||
"health_alarm_notify.conf",
|
"health_alarm_notify.conf",
|
||||||
'SEND_EMAIL="YES"',
|
'SEND_EMAIL="YES"',
|
||||||
'SEND_EMAIL="NO"')
|
'SEND_EMAIL="NO"')
|
||||||
|
WOFileUtils.copyfile(self, "/opt/netdata/usr/"
|
||||||
|
"lib/netdata/conf.d/"
|
||||||
|
"health_alarm_notify.conf",
|
||||||
|
"/opt/netdata/etc/netdata/"
|
||||||
|
"health_alarm_notify.conf")
|
||||||
# check if mysql credentials are available
|
# check if mysql credentials are available
|
||||||
if os.path.isfile('/etc/mysql/conf.d/my.cnf'):
|
if os.path.isfile('/etc/mysql/conf.d/my.cnf'):
|
||||||
try:
|
try:
|
||||||
@@ -1546,16 +1551,7 @@ class WOStackController(CementBaseController):
|
|||||||
# PHPMYADMIN
|
# PHPMYADMIN
|
||||||
if self.app.pargs.phpmyadmin:
|
if self.app.pargs.phpmyadmin:
|
||||||
Log.debug(self, "Setting packages variable for phpMyAdmin ")
|
Log.debug(self, "Setting packages variable for phpMyAdmin ")
|
||||||
if (not self.app.pargs.composer):
|
self.app.pargs.composer = True
|
||||||
packages = packages + [["https://github.com/phpmyadmin/"
|
|
||||||
"phpmyadmin/archive/STABLE.tar.gz",
|
|
||||||
"/var/lib/wo/tmp/pma.tar.gz",
|
|
||||||
"phpMyAdmin"],
|
|
||||||
["https://getcomposer.org/"
|
|
||||||
"installer",
|
|
||||||
"/var/lib/wo/tmp/composer-install",
|
|
||||||
"Composer"]]
|
|
||||||
else:
|
|
||||||
packages = packages + [["https://github.com/phpmyadmin/"
|
packages = packages + [["https://github.com/phpmyadmin/"
|
||||||
"phpmyadmin/archive/STABLE.tar.gz",
|
"phpmyadmin/archive/STABLE.tar.gz",
|
||||||
"/var/lib/wo/tmp/pma.tar.gz",
|
"/var/lib/wo/tmp/pma.tar.gz",
|
||||||
@@ -1569,6 +1565,7 @@ class WOStackController(CementBaseController):
|
|||||||
# PHPREDISADMIN
|
# PHPREDISADMIN
|
||||||
if self.app.pargs.phpredisadmin:
|
if self.app.pargs.phpredisadmin:
|
||||||
Log.debug(self, "Setting packages variable for phpRedisAdmin")
|
Log.debug(self, "Setting packages variable for phpRedisAdmin")
|
||||||
|
self.app.pargs.composer = True
|
||||||
packages = packages + [["https://github.com/erikdubbelboer/"
|
packages = packages + [["https://github.com/erikdubbelboer/"
|
||||||
"phpRedisAdmin/archive/v1.11.3.tar.gz",
|
"phpRedisAdmin/archive/v1.11.3.tar.gz",
|
||||||
"/var/lib/wo/tmp/pra.tar.gz",
|
"/var/lib/wo/tmp/pra.tar.gz",
|
||||||
@@ -1771,6 +1768,8 @@ class WOStackController(CementBaseController):
|
|||||||
self.app.pargs.composer = True
|
self.app.pargs.composer = True
|
||||||
self.app.pargs.utils = True
|
self.app.pargs.utils = True
|
||||||
self.app.pargs.netdata = True
|
self.app.pargs.netdata = True
|
||||||
|
self.app.pargs.dashboard = True
|
||||||
|
self.app.pargs.phpredisadmin = True
|
||||||
|
|
||||||
# NGINX
|
# NGINX
|
||||||
if self.app.pargs.nginx:
|
if self.app.pargs.nginx:
|
||||||
@@ -1837,7 +1836,10 @@ class WOStackController(CementBaseController):
|
|||||||
# PHPREDISADMIN
|
# PHPREDISADMIN
|
||||||
if self.app.pargs.phpredisadmin:
|
if self.app.pargs.phpredisadmin:
|
||||||
Log.debug(self, "Removing package variable of phpRedisAdmin ")
|
Log.debug(self, "Removing package variable of phpRedisAdmin ")
|
||||||
packages = packages + ['{0}22222/htdocs/cache/redis/phpRedisAdmin'
|
if os.path.isdir('{0}22222/htdocs/cache/redis'
|
||||||
|
.format(WOVariables.wo_webroot)):
|
||||||
|
packages = packages + ['{0}22222/htdocs/'
|
||||||
|
'cache/redis/phpRedisAdmin'
|
||||||
.format(WOVariables.wo_webroot)]
|
.format(WOVariables.wo_webroot)]
|
||||||
# ADMINER
|
# ADMINER
|
||||||
if self.app.pargs.adminer:
|
if self.app.pargs.adminer:
|
||||||
@@ -1864,6 +1866,13 @@ class WOStackController(CementBaseController):
|
|||||||
'libexec/netdata-uninstaller.sh'):
|
'libexec/netdata-uninstaller.sh'):
|
||||||
packages = packages + ['/var/lib/wo/tmp/kickstart.sh']
|
packages = packages + ['/var/lib/wo/tmp/kickstart.sh']
|
||||||
|
|
||||||
|
if self.app.pargs.dashboard:
|
||||||
|
Log.debug(self, "Removing Wo-Dashboard")
|
||||||
|
packages = packages + ['{0}22222/htdocs/assets/'
|
||||||
|
.format(WOVariables.wo_webroot),
|
||||||
|
'{0}22222/htdocs/index.php'
|
||||||
|
.format(WOVariables.wo_webroot)]
|
||||||
|
|
||||||
if (packages) or (apt_packages):
|
if (packages) or (apt_packages):
|
||||||
wo_prompt = input('Are you sure you to want to'
|
wo_prompt = input('Are you sure you to want to'
|
||||||
' remove from server.'
|
' remove from server.'
|
||||||
@@ -1932,6 +1941,8 @@ class WOStackController(CementBaseController):
|
|||||||
self.app.pargs.utils = True
|
self.app.pargs.utils = True
|
||||||
self.app.pargs.composer = True
|
self.app.pargs.composer = True
|
||||||
self.app.pargs.netdata = True
|
self.app.pargs.netdata = True
|
||||||
|
self.app.pargs.dashboard = True
|
||||||
|
self.app.pargs.phpredisadmin = True
|
||||||
|
|
||||||
# NGINX
|
# NGINX
|
||||||
if self.app.pargs.nginx:
|
if self.app.pargs.nginx:
|
||||||
@@ -1991,7 +2002,10 @@ class WOStackController(CementBaseController):
|
|||||||
# PHPREDISADMIN
|
# PHPREDISADMIN
|
||||||
if self.app.pargs.phpredisadmin:
|
if self.app.pargs.phpredisadmin:
|
||||||
Log.debug(self, "Removing package variable of phpRedisAdmin ")
|
Log.debug(self, "Removing package variable of phpRedisAdmin ")
|
||||||
packages = packages + ['{0}22222/htdocs/cache/redis/phpRedisAdmin'
|
if os.path.isdir('{0}22222/htdocs/cache/redis'
|
||||||
|
.format(WOVariables.wo_webroot)):
|
||||||
|
packages = packages + ['{0}22222/htdocs/'
|
||||||
|
'cache/redis/phpRedisAdmin'
|
||||||
.format(WOVariables.wo_webroot)]
|
.format(WOVariables.wo_webroot)]
|
||||||
# Adminer
|
# Adminer
|
||||||
if self.app.pargs.adminer:
|
if self.app.pargs.adminer:
|
||||||
@@ -2020,6 +2034,13 @@ class WOStackController(CementBaseController):
|
|||||||
'libexec/netdata-uninstaller.sh'):
|
'libexec/netdata-uninstaller.sh'):
|
||||||
packages = packages + ['/var/lib/wo/tmp/kickstart.sh']
|
packages = packages + ['/var/lib/wo/tmp/kickstart.sh']
|
||||||
|
|
||||||
|
if self.app.pargs.dashboard:
|
||||||
|
Log.debug(self, "Removing Wo-Dashboard")
|
||||||
|
packages = packages + ['{0}22222/htdocs/assets/'
|
||||||
|
.format(WOVariables.wo_webroot),
|
||||||
|
'{0}22222/htdocs/index.php'
|
||||||
|
.format(WOVariables.wo_webroot)]
|
||||||
|
|
||||||
if (packages) or (apt_packages):
|
if (packages) or (apt_packages):
|
||||||
wo_prompt = input('Are you sure you to want to purge '
|
wo_prompt = input('Are you sure you to want to purge '
|
||||||
'from server '
|
'from server '
|
||||||
|
|||||||
Reference in New Issue
Block a user