]> arthur.barton.de Git - backup-script.git/blobdiff - bin/backup-script
backup-script-wrapper: Return exit code of backup-script
[backup-script.git] / bin / backup-script
index 412d7b6a12429582244d20d3bba5986d75cfc598..0ac5fe242ad22abf5780b953e13027773a7a1524 100755 (executable)
@@ -32,7 +32,7 @@ destinations=""
 pre_exec=""
 post_exec=""
 default_source_root="/"
-default_target=""
+default_target="/var/backups"
 default_user="root"
 default_ssh_args_add=""
 default_rsync_args_add=""
@@ -266,8 +266,9 @@ Initialize_Last_SysTarget_Snapshot() {
 # Search configuration file (last one is used as default!)
 for conf in \
        "/usr/local/etc/backup-script.conf" \
-       "${conf_d}/backup-script.conf" \
        "/etc/backup-script.conf" \
+       "${conf_d}/backup-script.conf" \
+       "/usr/local/etc/backup-script.conf" \
 ; do
        [ -r "$conf" ] && break
 done
@@ -396,7 +397,11 @@ for f in $sys; do
        post_exec="$post_exec_saved"
 
        # Validate configuration
-       [ "$system" = "localhost" -o "$system" = "127.0.0.1" ] && local=1
+       if [ "$system" = "localhost" -o "$system" = "127.0.0.1" ]; then
+               # Local system
+               local=1
+               compress=0
+       fi
 
        # Make sure "source" ends with a slash ("/")
        case "$source" in