bug fix: use different lscpd versions according to os detection

This commit is contained in:
Usman Nasir
2022-10-06 14:17:57 +05:00
parent 3ca85226d6
commit 06b2834a28
2 changed files with 6 additions and 4 deletions

View File

@@ -1459,8 +1459,9 @@ autocreate_system_folders = On
result = open('/etc/lsb-release', 'r').read()
lscpdSelection = 'lscpd-0.3.1'
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0'
if os.path.exists('/etc/lsb-release'):
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0'
command = f'cp -f /usr/local/CyberCP/{lscpdSelection} /usr/local/lscp/bin/{lscpdSelection}'

View File

@@ -1995,8 +1995,9 @@ autocreate_system_folders = On
result = open(Upgrade.UbuntuPath, 'r').read()
lscpdSelection = 'lscpd-0.3.1'
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0'
if os.path.exists(Upgrade.UbuntuPath):
if result.find('22.04') > -1:
lscpdSelection = 'lscpd.0.4.0'
command = f'cp -f /usr/local/CyberCP/{lscpdSelection} /usr/local/lscp/bin/{lscpdSelection}'
Upgrade.executioner(command, command, 0)