]> arthur.barton.de Git - backup-script.git/commitdiff
Read /etc/backup-script.conf as configureation file, too
authorAlexander Barton <alex@barton.de>
Mon, 17 Nov 2014 16:52:24 +0000 (17:52 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 17 Nov 2014 16:52:49 +0000 (17:52 +0100)
bin/backup-script

index 480107cee4436ef187d3ee168c36a84a6ae06229..e6f106532e41df9a5b099e20d6fe86c96653e224 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # backup-script system for cloning systems using rsync
-# Copyright (c)2008-2013 Alexander Barton, alex@barton.de
+# Copyright (c)2008-2014 Alexander Barton, alex@barton.de
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -103,9 +103,14 @@ fi
 trap GotSignal SIGINT
 
 echo -n "Started: "; date
-echo
 
-[ -r "${CONF_D}/backup-script.conf" ] && source "${CONF_D}/backup-script.conf"
+for conf in "/etc/backup-script.conf" "${CONF_D}/backup-script.conf"; do
+       if [ -r "$conf" ]; then
+               echo "Reading configuration: \"$conf\" ..."
+               source "$conf"
+       fi
+done
+echo
 
 # check and create PID file
 if [ -e "$PIDFILE" ]; then