From bd9664a6ec6cde06cdac817058baa426174e03f6 Mon Sep 17 00:00:00 2001 From: deajan Date: Sun, 23 Mar 2014 17:46:08 +0100 Subject: [PATCH] Minor fixes --- host_backup.conf | 4 ++-- obackup.sh | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/host_backup.conf b/host_backup.conf index 2a5d9a7..785276d 100755 --- a/host_backup.conf +++ b/host_backup.conf @@ -2,7 +2,7 @@ ###### Remote (or local) backup script for files & databases ###### (L) 2013 by Ozy de Jong (www.netpower.fr) -###### Config file rev 0211201301 +###### Config file rev 0903201401 ## ---------- GENERAL BACKUP OPTIONS @@ -58,7 +58,7 @@ REMOTE_PORT=22 ## ssh compression should be used unless your remote connection is good enough (LAN) SSH_COMPRESSION=yes ## Remote rsync executable path. Leave this empty in most cases -REMOTE_RSYNC_PATH="" +RSYNC_REMOTE_PATH="" ## Check for connectivity to remote host before launching remote backup tasks. Be sure the hosts responds to ping. Failing to ping will skip current task. REMOTE_HOST_PING=yes diff --git a/obackup.sh b/obackup.sh index 7b07b21..3b732e8 100755 --- a/obackup.sh +++ b/obackup.sh @@ -3,7 +3,7 @@ ###### Remote (or local) backup script for files & databases ###### (L) 2013 by Orsiris "Ozy" de Jong (www.netpower.fr) OBACKUP_VERSION=1.84RC3 -OBACKUP_BUILD=1911201301 +OBACKUP_BUILD=2303201401 DEBUG=no SCRIPT_PID=$$ @@ -227,9 +227,11 @@ function SendAlert fi else Log "WARNING: Cannot send alert email (no mutt / mail present) !!!" - rm -f $RUN_DIR/obackup_lastlog.gz - return 1 - rm -f $RUN_DIR/obackup_lastlog.gz + fi + + if -f $RUN_DIR/obackup_lastlog.gz + then + rm $RUN_DIR/obackup_lastlog.gz fi } @@ -1170,7 +1172,7 @@ function Init then if [ "$RSYNC_REMOTE_PATH" != "" ] then - RSYNC_PATH="sudo $(type -p $RSYNC_REMOTE_PATH)/$RSYNC_EXECUTABLE)" + RSYNC_PATH="sudo $RSYNC_REMOTE_PATH/$RSYNC_EXECUTABLE" else RSYNC_PATH="sudo $RSYNC_EXECUTABLE" fi @@ -1178,7 +1180,7 @@ function Init else if [ "$RSYNC_REMOTE_PATH" != "" ] then - RSYNC_PATH="$(type -p $RSYNC_REMOTE_PATH)/$RSYNC_EXECUTABLE)" + RSYNC_PATH="$RSYNC_REMOTE_PATH/$RSYNC_EXECUTABLE" else RSYNC_PATH="$RSYNC_EXECUTABLE" fi