diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-06-07 12:43:10 +0100 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-06-07 12:43:10 +0100 |
commit | 8c6972d4ffdb2e07b372f582156fd6c0bf09364b (patch) | |
tree | 7a2680cb100cfab01838aaddd0480631def0f221 | |
parent | 47077daaec91ca2e078055891194680e5796462d (diff) | |
download | hydra-8c6972d4ffdb2e07b372f582156fd6c0bf09364b.tar.gz hydra-8c6972d4ffdb2e07b372f582156fd6c0bf09364b.tar.bz2 |
Fix: hydractl: sync-media: allow 'localhost' to be set as the remote host
-rwxr-xr-x | share/hydractl/sync-media | 6 |
1 files changed, 3 insertions, 3 deletions
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 |