diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-03-31 00:34:55 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-03-31 00:34:55 -0400 |
commit | 44c373964e9ed3be71a499f7c40402b07cbe9139 (patch) | |
tree | 07777310fa5df3c369260b56673a08b11c075fbd /bin/secrets | |
parent | 20f4c116276dbc9a98e219e1cb1e8034ec320dc0 (diff) | |
download | puppet-tozt-44c373964e9ed3be71a499f7c40402b07cbe9139.tar.gz puppet-tozt-44c373964e9ed3be71a499f7c40402b07cbe9139.zip |
allow syncing secrets via algo
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 |