diff --git a/plogical/upgrade.py b/plogical/upgrade.py index e40440182..2fa41840a 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -2161,11 +2161,26 @@ CREATE TABLE `websiteFunctions_backupsv2` (`id` integer AUTO_INCREMENT NOT NULL if os.path.exists(lscpdPath): os.remove(lscpdPath) - lscpdSelection = 'lscpd-0.3.1' - if os.path.exists(Upgrade.UbuntuPath): - result = open(Upgrade.UbuntuPath, 'r').read() - if result.find('22.04') > -1: - lscpdSelection = 'lscpd.0.4.0' + + try: + result = subprocess.run('uname -a', capture_output=True, text=True, shell=True) + + if result.stdout.find('aarch64') == -1: + lscpdSelection = 'lscpd-0.3.1' + if os.path.exists(Upgrade.UbuntuPath): + result = open(Upgrade.UbuntuPath, 'r').read() + if result.find('22.04') > -1: + lscpdSelection = 'lscpd.0.4.0' + else: + lscpdSelection = 'lscpd.aarch64' + + except: + + lscpdSelection = 'lscpd-0.3.1' + if os.path.exists(Upgrade.UbuntuPath): + result = open(Upgrade.UbuntuPath, 'r').read() + 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)