From 288a671984a2b68b45c22dedde78ecc7a7f89a82 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Thu, 13 Aug 2015 13:00:49 +0300 Subject: Run-parts against our pre-backup directory. If the /etc/byteback/pre-backup.d/ directory is present then execute the contents. --- bin/byteback-backup | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/byteback-backup b/bin/byteback-backup index 6f34591..4d1b237 100755 --- a/bin/byteback-backup +++ b/bin/byteback-backup @@ -113,7 +113,6 @@ end ## if __FILE__ == $PROGRAM_NAME - ME = $PROGRAM_NAME.split('/').last opts = Trollop.options do @@ -261,6 +260,13 @@ if __FILE__ == $PROGRAM_NAME # fatal("Could not read ssh key #{@ssh_key}") unless File.readable?(@ssh_key) + + # + # Run our pre-backup actions, if any + # + run_parts( "/etc/byteback/pre-backup.d/" ) + + # # Test ssh connection is good before we start # -- cgit v1.2.3