From 8c6972d4ffdb2e07b372f582156fd6c0bf09364b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 7 Jun 2024 12:43:10 +0100 Subject: Fix: hydractl: sync-media: allow 'localhost' to be set as the remote host --- share/hydractl/sync-media | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'share') 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 -- cgit v1.2.3