Pavel Loginov 3 years ago
parent 449820b49b
commit eeb048cf08

@ -74,14 +74,12 @@ services_name = {'roxy-wi-checker': 'Master backends checker service',
'roxy-wi-keep_alive': 'Auto start service', 'roxy-wi-keep_alive': 'Auto start service',
'roxy-wi-metrics': 'Master metrics service'} 'roxy-wi-metrics': 'Master metrics service'}
for s, v in services_name.items(): for s, v in services_name.items():
if s != 'roxy-wi-keep_alive':
service_name = s.split('_')[0]
else:
service_name = s
if distro.id() == 'ubuntu': if distro.id() == 'ubuntu':
cmd = "apt list --installed 2>&1 |grep " + service_name if s == 'roxy-wi-keep_alive':
s = 'roxy-wi-keep-alive'
cmd = "apt list --installed 2>&1 |grep " + s
else: else:
cmd = "rpm --query " + service_name + "-* |awk -F\"" + service_name + "\" '{print $2}' |awk -F\".noa\" '{print $1}' |sed 's/-//1' |sed 's/-/./'" cmd = "rpm --query " + s + "-* |awk -F\"" + s + "\" '{print $2}' |awk -F\".noa\" '{print $1}' |sed 's/-//1' |sed 's/-/./'"
service_ver, stderr = funct.subprocess_execute(cmd) service_ver, stderr = funct.subprocess_execute(cmd)
try: try:
services.append([s, service_ver[0]]) services.append([s, service_ver[0]])

Loading…
Cancel
Save