summaryrefslogtreecommitdiffstats
path: root/bin/launch
blob: 663b17689f689690e7196034075735bf357d200e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
set -eu
set -o pipefail

script_path="$(realpath "$(dirname "$0")")"
secrets_bin="${script_path}/secrets"

case "$1" in
    tozt|algo|mail|partofme)
        "$secrets_bin" open
        trap '"$secrets_bin" close' EXIT
        "$(dirname "$0")/helpers/launch-$1"
        ;;
    *)
        echo "unknown host $1" >&2
        exit 1
        ;;
esac