@ -8,7 +8,7 @@ if [ ! -e "$HOSTS" ]; then echo "Missing hosts file. Please set a correct value
@@ -8,7 +8,7 @@ if [ ! -e "$HOSTS" ]; then echo "Missing hosts file. Please set a correct value
# Get current date
DATE=$(date +"%Y-%m-%d_%H-%M")
LOG="$CURDIR"/uberspace-backup.log
LOG="$CURDIR"/backup.log
function trim {
sed -r -e 's/^\s*//g' -e 's/\s*$//g'
@ -17,11 +17,6 @@ function pdate {
@@ -17,11 +17,6 @@ function pdate {
DATE=$(date +%y-%m-%d_%H:%M:%S)
echo"[$DATE]"
}
function logrun {
# Write command itself to log, and pipe errors to log
echo"$(pdate)$@" >> "$LOG"
eval"$@" 2>> "$LOG"
}
function logecho {
# Echo string and copy it to log while attaching the current date
echo"$(pdate)$@"
@ -66,19 +61,19 @@ while read line; do
@@ -66,19 +61,19 @@ while read line; do
logecho "${RHOST}: Downloading ${SOURCE} to ${DEST}"