From d3f5709b72eef0c041dea90677f50eb7846f56cc Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Sun, 19 Feb 2023 17:30:06 +0100 Subject: [PATCH] Fix logging --- bashclub-zsync/usr/bin/bashclub-zsync | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bashclub-zsync/usr/bin/bashclub-zsync b/bashclub-zsync/usr/bin/bashclub-zsync index 7739bf5..ffddec1 100644 --- a/bashclub-zsync/usr/bin/bashclub-zsync +++ b/bashclub-zsync/usr/bin/bashclub-zsync @@ -57,7 +57,7 @@ done shift $((OPTIND-1)) function log() { - echo "$(date +'%b %d %T') $1" + echo -e "$(date +'%b %d %T') $1" } # load config file @@ -82,10 +82,10 @@ if [[ $source == "" ]]; then log "source is empty, switching to local mode." ssh= sshport= - log -e "Configuration:\n\ttarget=$target\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n" + log "Configuration:\n\ttarget=$target\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n" else sshport=-p$sshport - log -e "Configuration:\n\ttarget=$target\n\tsource=$source\n\tsshport=$sshport\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n" + log "Configuration:\n\ttarget=$target\n\tsource=$source\n\tsshport=$sshport\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n" fi # query source datasets/subvols to replicate