Remove netdata user in case of stack purge

This commit is contained in:
VirtuBox
2019-12-06 13:12:01 +01:00
parent 0e12bc29db
commit 01897adce6

View File

@@ -1140,6 +1140,9 @@ class WOStackController(CementBaseController):
WOShellExec.cmd_exec(self, "bash /opt/netdata/usr/"
"libexec/netdata/netdata-"
"uninstaller.sh -y -f")
if WOShellExec.cmd_exec(self, 'mysqladmin ping'):
WOMysql.execute(
self, "DELETE FROM mysql.user WHERE User = 'netdata';")
if (apt_packages):
Log.wait(self, "Purging APT Packages ")