Skip to content

Commit 1433399

Browse files
Merge c0cf5ca into master-ci
2 parents 0d7d7ea + c0cf5ca commit 1433399

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

openpod/updater.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ def update_pod():
4747
# Copy the files to the root directory.
4848
os.makedirs(f"/opt/OpenPod/versions/{latest_version['hash']}/", exist_ok=True)
4949
shutil.move(
50-
f"OpenPod-{latest_version['hash']}/OpenPod/",
50+
f"OpenPod-{latest_version['hash']}/openpod/",
5151
f"/opt/OpenPod/versions/{latest_version['hash']}/"
5252
)
5353

5454
except RuntimeError as err:
5555
exception_log.error("Unable to pull update with error: %s", err)
56+
except FileNotFoundError as err:
57+
exception_log.error("Unable to find file with error: %s", err)
5658

5759
else:
5860
# Update the version number in the config file.
@@ -66,4 +68,4 @@ def update_pod():
6668

6769
shutil.rmtree(f"OpenPod-{latest_version['hash']}/", ignore_errors=True)
6870

69-
sys.exit() # Force OpenPod to restart.
71+
os.system("sudo systemctl restart openpod.service")

0 commit comments

Comments
 (0)