diff options
Diffstat (limited to 'bin/secrets')
-rwxr-xr-x | bin/secrets | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/bin/secrets b/bin/secrets index 244431c..d5161e8 100755 --- a/bin/secrets +++ b/bin/secrets @@ -30,16 +30,30 @@ cmd_close() { } cmd_sync() { - host="${2:-tozt}" - if [ "${host}" = "tozt" ]; then - hostname=tozt.net - elif [ "${host}" = "mail" ]; then - hostname=mail.tozt.net - elif [ "${host}" = "partofme" ]; then - hostname=partofme + if [ "${2:-}" = "--algo" ]; then + host="${3:-tozt}" + if [ "${host}" = "tozt" ]; then + hostname=tozt.algo + elif [ "${host}" = "mail" ]; then + hostname=mail.algo + elif [ "${host}" = "partofme" ]; then + hostname=partofme.algo + else + echo "unknown host ${host}" >&2 + exit 1 + fi else - echo "unknown host ${host}" >&2 - exit 1 + host="${2:-tozt}" + if [ "${host}" = "tozt" ]; then + hostname=tozt.net + elif [ "${host}" = "mail" ]; then + hostname=mail.tozt.net + elif [ "${host}" = "partofme" ]; then + hostname=partofme + else + echo "unknown host ${host}" >&2 + exit 1 + fi fi if mounted && opened; then |