diff --git a/src/lxc/lxc.py b/src/lxc/lxc.py index c08d6c9..12b7d60 100644 --- a/src/lxc/lxc.py +++ b/src/lxc/lxc.py @@ -208,7 +208,8 @@ class LXC(LinuxMachine): :param script_path: :return: """ - return self.run_command(command=f"bash {script_path}", use_ssh=use_ssh) + return self.run_command(command=f"export TERM=linux && bash {script_path}", use_ssh=use_ssh) + def run_command(self, command: str, return_status_code: bool = False, exception_on_exit: bool = False, diff --git a/src/proxmox/proxmox.py b/src/proxmox/proxmox.py index 0a71d7b..07b01c3 100644 --- a/src/proxmox/proxmox.py +++ b/src/proxmox/proxmox.py @@ -260,9 +260,9 @@ class ProxmoxHost(LinuxMachine): self.run_command(f"pct push {lxc.id} {source} {destination.as_posix()}") if permission != 755: - lxc.run_command(f"chmod {permission} {destination}", return_status_code=True, use_ssh=use_ssh) + lxc.run_command(f"chmod {permission} {destination.as_posix()}", return_status_code=True, use_ssh=use_ssh) if owner != "root": - lxc.run_command(f"chown {owner} {destination}", return_status_code=True) + lxc.run_command(f"chown {owner} {destination.as_posix()}", return_status_code=True) def copy_folder_to_lxc(self, lxc: LXC, source: str or Path, destination: str or Path, permission: int = 755, owner: str = "root"):