Fix netdata upgrade for old versions

This commit is contained in:
VirtuBox
2022-10-20 11:52:57 +02:00
parent 9cad039fa0
commit b7a40234f3

View File

@@ -383,6 +383,15 @@ class WOStackUpgradeController(CementBaseController):
"bash /var/lib/wo/tmp/kickstart.sh " "bash /var/lib/wo/tmp/kickstart.sh "
"--dont-wait --no-updates --stable-channel", "--dont-wait --no-updates --stable-channel",
errormsg='', log=False) errormsg='', log=False)
if (os.path.exists('/opt/netdata') and
not os.path.exists(
'/opt/netdata/var/run/netdata/netdata.pid')):
WOShellExec.cmd_exec(
self,
'bash /var/lib/wo/tmp/kickstart.sh '
'--dont-wait --no-updates '
'--stable-channel --reinstall-even-if-unsafe',
errormsg='', log=False)
Log.valide(self, "Upgrading Netdata") Log.valide(self, "Upgrading Netdata")
if WOAptGet.is_selected(self, 'WordOps Dashboard', packages): if WOAptGet.is_selected(self, 'WordOps Dashboard', packages):