summaryrefslogtreecommitdiff
path: root/hosts/vidhar
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 12:38:54 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 12:38:54 +0100
commita27bdcbacdf206945545ee12251fbfab838183b3 (patch)
tree9eb6c991b092fdd82a594c9e4346878c6903b658 /hosts/vidhar
parentcf7bd776a362c53d8e1fc9e801235ca772385f32 (diff)
downloadnixos-a27bdcbacdf206945545ee12251fbfab838183b3.tar
nixos-a27bdcbacdf206945545ee12251fbfab838183b3.tar.gz
nixos-a27bdcbacdf206945545ee12251fbfab838183b3.tar.bz2
nixos-a27bdcbacdf206945545ee12251fbfab838183b3.tar.xz
nixos-a27bdcbacdf206945545ee12251fbfab838183b3.zip
vidhar: ...
Diffstat (limited to 'hosts/vidhar')
-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