fixed chmod path backslash and interactive scripts error
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9492a1d087
commit
df5b2187cb
@ -208,7 +208,8 @@ class LXC(LinuxMachine):
|
|||||||
:param script_path:
|
:param script_path:
|
||||||
:return:
|
: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,
|
def run_command(self, command: str, return_status_code: bool = False,
|
||||||
exception_on_exit: bool = False,
|
exception_on_exit: bool = False,
|
||||||
|
@ -260,9 +260,9 @@ class ProxmoxHost(LinuxMachine):
|
|||||||
self.run_command(f"pct push {lxc.id} {source} {destination.as_posix()}")
|
self.run_command(f"pct push {lxc.id} {source} {destination.as_posix()}")
|
||||||
|
|
||||||
if permission != 755:
|
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":
|
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,
|
def copy_folder_to_lxc(self, lxc: LXC, source: str or Path, destination: str or Path, permission: int = 755,
|
||||||
owner: str = "root"):
|
owner: str = "root"):
|
||||||
|
Loading…
Reference in New Issue
Block a user