summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rwxr-xr-xhosts/vidhar/borg/copy.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 04bb61f8..d8d64dca 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -21,6 +21,7 @@ from xdg import xdg_runtime_dir
21import pathlib 21import pathlib
22 22
23import unshare 23import unshare
24import signal
24from time import sleep 25from time import sleep
25 26
26from halo import Halo 27from halo import Halo
@@ -199,7 +200,12 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
199 if waitpid == child: 200 if waitpid == child:
200 break 201 break
201 202
203def sigterm(signum, frame):
204 raise SystemExit(128 + signum)
205
202def main(): 206def main():
207 signal.signal(signal.SIGTERM, sigterm)
208
203 if "::" in args.source: 209 if "::" in args.source:
204 (src_repo_path, _, src_archive) = args.source.partition("::") 210 (src_repo_path, _, src_archive) = args.source.partition("::")
205 entry = None 211 entry = None