From: Silvio Rhatto Date: Fri, 7 Jun 2024 11:43:10 +0000 (+0100) Subject: Fix: hydractl: sync-media: allow 'localhost' to be set as the remote host X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=8c6972d4ffdb2e07b372f582156fd6c0bf09364b;p=hydra.git Fix: hydractl: sync-media: allow 'localhost' to be set as the remote host --- diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media index 742123e..554e09a 100755 --- a/share/hydractl/sync-media +++ b/share/hydractl/sync-media @@ -136,7 +136,7 @@ function sync_media_ensure_remote { local remote="$1" local path="$2" - if [ -z "$remote" ] || [ "$remote" == "local" ] || [ -z "$path" ]; then + if [ -z "$remote" ] || [ "$remote" == "local" ] || [ "$remote" == "localhost" ] || [ -z "$path" ]; then return fi @@ -172,7 +172,7 @@ fi # Set drive config # Ingore drive/volume if it's set to "local" -if [ ! -z "$REMOTE" ] && [ "$REMOTE" != "local" ]; then +if [ ! -z "$REMOTE" ] && [ "$REMOTE" != "local" ] && [ "$REMOTE" != "localhost" ]; then # Check storage media MOUNT="`mount | grep $VOLUME`" if [ ! -z "$MOUNT" ]; then @@ -382,7 +382,7 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then fi fi done -elif [ ! -z "$REMOTE" ] && [ "$REMOTE" != "local" ]; then +elif [ ! -z "$REMOTE" ] && [ "$REMOTE" != "local" ] && [ "$REMOTE" != "localhost" ]; then # Try to copy to a remote for folder in `ls $CACHE`; do if [ -d "$CACHE/$folder/.git/annex" ]; then