edit lxc config and fix path
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
85329abf4b
commit
2e70f64269
@ -36,9 +36,14 @@
|
|||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"type": "script",
|
"type": "script",
|
||||||
"path": "/global/install-docker.sh"
|
"local_path": "global/scripts/install-docker.sh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "folder_copy",
|
||||||
|
"path": "data/",
|
||||||
|
"destination": "/var/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"deploy": []
|
"deploy": {}
|
||||||
}
|
}
|
@ -71,7 +71,7 @@ def _run_local_script_on_lxc(lxc: LXC, path: Path):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Copy the script to /tmp and run it from there
|
# Copy the script to /tmp and run it from there
|
||||||
proxmox_utils.copy_file_to_lxc(lxc.get_id(), str(path), "/tmp/pdj-scripts/")
|
proxmox_utils.copy_file_to_lxc(lxc.get_id(), path, "/tmp/pdj-scripts/")
|
||||||
lxc.run_command(f"bash /tmp/pdj-scripts/{path.name}")
|
lxc.run_command(f"bash /tmp/pdj-scripts/{path.name}")
|
||||||
|
|
||||||
# with open(path, "r") as file:
|
# with open(path, "r") as file:
|
||||||
|
@ -347,7 +347,7 @@ def copy_file_to_pve(path: Path, destination: str):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
config = get_config()
|
config = get_config()
|
||||||
run_command_locally(f"scp {str(path)} {config['pve']['root']}@{config['pve']['host']}:{destination}")
|
run_command_locally(f"scp {str(path)} {config['pve']['user']}@{config['pve']['host']}:{destination}")
|
||||||
|
|
||||||
|
|
||||||
def copy_file_to_lxc(lxc_id: int, path: Path, destination: str):
|
def copy_file_to_lxc(lxc_id: int, path: Path, destination: str):
|
||||||
|
Loading…
Reference in New Issue
Block a user