From 882c7cfacf8df3f0adb628f4e5a5fa170178798e Mon Sep 17 00:00:00 2001 From: Lutchy Horace Date: Mon, 8 Jan 2024 23:03:28 -0500 Subject: [PATCH] Remove timeout, remove temp script, and catch exit status --- borgbackup.sh | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/borgbackup.sh b/borgbackup.sh index 9fff3c3..fa6b8bf 100755 --- a/borgbackup.sh +++ b/borgbackup.sh @@ -49,12 +49,14 @@ if test -f /etc/borgbackup.conf; then source /etc/borgbackup.conf fi -# Define the expect script in a variable -expect_script=$(cat < "$expect_script_file" - -# Make the temporary expect script executable -chmod +x "$expect_script_file" - -# Execute the expect script -$expect_script_file - -# Clean up the temporary expect script -rm -f "$expect_script_file" +echo "Borg exit status: exit_status=$?" echo "Running POSTHOOK..." -eval $POSTHOOK \ No newline at end of file +eval $POSTHOOK + +exit $exit_status \ No newline at end of file