Skip to content

Commit

Permalink
bug fix rustic on arm: https://app.clickup.com/t/86enfdrd7
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 16, 2024
1 parent 929a6be commit 933fc2e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
22 changes: 17 additions & 5 deletions plogical/Backupsv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,13 +1262,25 @@ def InstallRustic(self):
return 0, str(response.content)

# sudo mv filename /usr/bin/
command = 'wget -P /home/rustic https://github.com/rustic-rs/rustic/releases/download/%s/rustic-%s-x86_64-unknown-linux-musl.tar.gz' % (
from plogical.acl import ACLManager

if ACLManager.ISARM():
command = 'wget -P /home/rustic https://github.com/rustic-rs/rustic/releases/download/%s/rustic-%s-aarch64-unknown-linux-gnu.tar.gz' % (
version, version)
ProcessUtilities.executioner(command)

command = 'tar xzf /home/rustic/rustic-%s-aarch64-unknown-linux-gnu.tar.gz -C /home/rustic//' % (
version)
ProcessUtilities.executioner(command)

else:
command = 'wget -P /home/rustic https://github.com/rustic-rs/rustic/releases/download/%s/rustic-%s-x86_64-unknown-linux-musl.tar.gz' % (
version, version)
ProcessUtilities.executioner(command)
ProcessUtilities.executioner(command)

command = 'tar xzf /home/rustic/rustic-%s-x86_64-unknown-linux-musl.tar.gz -C /home/rustic//' % (
version)
ProcessUtilities.executioner(command)
command = 'tar xzf /home/rustic/rustic-%s-x86_64-unknown-linux-musl.tar.gz -C /home/rustic//' % (
version)
ProcessUtilities.executioner(command)

command = 'sudo mv /home/rustic/rustic /usr/bin/'
ProcessUtilities.executioner(command)
Expand Down
14 changes: 14 additions & 0 deletions plogical/acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,4 +1085,18 @@ def ReplaceDocRootApache(vhostConf, domainName, NewDocRoot):
pass


@staticmethod
def ISARM():

command = 'uname -a'
result = ProcessUtilities.outputExecutioner(command)

if result.find('aarch64') > -1:
return True
else:
return False





0 comments on commit 933fc2e

Please sign in to comment.