diff options
author | tv <tv@krebsco.de> | 2016-04-17 10:25:59 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-04-17 11:23:35 +0200 |
commit | 41ff57c6d6a7ed4d8562169c0d3fd9d6adb949e6 (patch) | |
tree | 556adda23190777c1f81bd39579a0c3dd5bb730a /krebs/5pkgs/get-ssh-port/default.nix | |
parent | f5f7abce0d343c20a35bb12c49d03c5bf544d8a9 (diff) |
krebs.backup: use globally configured ssh ports
Diffstat (limited to 'krebs/5pkgs/get-ssh-port/default.nix')
-rw-r--r-- | krebs/5pkgs/get-ssh-port/default.nix | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/krebs/5pkgs/get-ssh-port/default.nix b/krebs/5pkgs/get-ssh-port/default.nix deleted file mode 100644 index 2d106b2b6..000000000 --- a/krebs/5pkgs/get-ssh-port/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, pkgs, ... }: with config.krebs.lib; - -pkgs.writeScriptBin "get-ssh-port" '' - #! ${pkgs.dash}/bin/dash - set -efu - if test $# != 1 || test $1 = -h || test $1 = --help; then - echo "usage: get-ssh-port HOSTNAME" >&2 - exit 23 - fi - case $1 in - ${concatMapStringsSep ";;\n" - (host: toString [ - "(${shell.escape host.name})" - "echo ${toString host.nets.${config.krebs.search-domain}.ssh.port}" - ]) - (filter (host: hasAttr config.krebs.search-domain host.nets) - (attrValues config.krebs.hosts)) - };; - ${concatMapStringsSep ";;\n" - (net: toString [ - "(${concatMapStringsSep "|" shell.escape net.aliases})" - "echo ${toString net.ssh.port}" - ]) - (concatMap (host: attrValues host.nets) (attrValues config.krebs.hosts)) - };; - (*) echo "get-ssh-port: don't know ssh port of $1" >&2 - exit 1 - esac -'' |