From 458ce5534b44740e55af8da0b4d9f130ad958717 Mon Sep 17 00:00:00 2001 From: paspo Date: Sun, 14 Dec 2025 22:01:29 +0100 Subject: [PATCH] interruption handling --- rootfs/app/backup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rootfs/app/backup.sh b/rootfs/app/backup.sh index 3fa5957..e078e42 100755 --- a/rootfs/app/backup.sh +++ b/rootfs/app/backup.sh @@ -23,6 +23,13 @@ cleanup() { echo "Removed temporary file" } +trap interrupt INT +interrupt() { + echo "Backup interrupted" + echo "interrupted" > "${STATUS_FILE}" + exit 1 +} + if [ ! -f "${RCLONE_CONFIG_FILE}" ]; then echo "Rclone config file not found" exit 1