Updated pathing
This commit is contained in:
@@ -6,7 +6,7 @@ PYTHON_BIN=/usr/bin/python3
|
|||||||
|
|
||||||
# Absolute path where the repo is installed
|
# Absolute path where the repo is installed
|
||||||
# (directory that contains run_backup.py)
|
# (directory that contains run_backup.py)
|
||||||
BACKUP_INSTALL_DIR=/usr/local/kvm-backup
|
BACKUP_INSTALL_DIR=/home/ubuntu/Documents/kvm-backup
|
||||||
|
|
||||||
# Name of the python entrypoint file
|
# Name of the python entrypoint file
|
||||||
BACKUP_RUNNER=run_backup.py
|
BACKUP_RUNNER=run_backup.py
|
||||||
|
|||||||
@@ -7,13 +7,15 @@ import os
|
|||||||
|
|
||||||
# ================= CONFIG =================
|
# ================= CONFIG =================
|
||||||
|
|
||||||
|
SCRIPT_DIR = pathlib.Path(__file__).resolve().parent
|
||||||
|
|
||||||
SCRIPTS = [
|
SCRIPTS = [
|
||||||
"backup_configs.sh",
|
SCRIPT_DIR / "backup_configs.sh",
|
||||||
"backup_home.sh",
|
SCRIPT_DIR / "backup_home.sh",
|
||||||
"backup_vms.sh",
|
SCRIPT_DIR / "backup_vms.sh",
|
||||||
]
|
]
|
||||||
|
|
||||||
LOG_DIR = "job-runner"
|
LOG_DIR = SCRIPT_DIR / "job-runner"
|
||||||
|
|
||||||
# ==========================================
|
# ==========================================
|
||||||
|
|
||||||
@@ -34,7 +36,7 @@ def run_script(script_path, run_ts):
|
|||||||
|
|
||||||
with open(out_file, "wb") as out, open(err_file, "wb") as err:
|
with open(out_file, "wb") as out, open(err_file, "wb") as err:
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
["/bin/bash", script_path],
|
["/bin/bash", str(script_path)],
|
||||||
stdout=out,
|
stdout=out,
|
||||||
stderr=err,
|
stderr=err,
|
||||||
env={
|
env={
|
||||||
|
|||||||
Reference in New Issue
Block a user