diff options
author | Alex Auvolat <alex@adnab.me> | 2022-02-09 12:09:49 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-02-09 12:09:49 +0100 |
commit | f03cafd49b48eabc4743b3a3791fd22f19cb0de1 (patch) | |
tree | e31d1c68502e4ee2f8f4dc67235eac0e220b2fbd /tlsproxy.sh | |
parent | cce5cd17f5429295eb2165480ca941dd3f49b788 (diff) | |
download | nixcfg-f03cafd49b48eabc4743b3a3791fd22f19cb0de1.tar.gz nixcfg-f03cafd49b48eabc4743b3a3791fd22f19cb0de1.zip |
Modularize and prepare to support multiple clusters
Diffstat (limited to 'tlsproxy.sh')
-rwxr-xr-x | tlsproxy.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tlsproxy.sh b/tlsproxy.sh index aa0006a..a893872 100755 --- a/tlsproxy.sh +++ b/tlsproxy.sh @@ -1,5 +1,22 @@ #!/bin/sh +set -xe + +# Enter proper cluster subdirectory + +cd $(dirname $0) + +CLUSTER="$1" +if [ ! -d "cluster/$CLUSTER" ]; then + echo "Usage: $0 <cluster name>" + echo "The cluster name must be the name of a subdirectory of cluster/" + exit 1 +fi + +cd cluster/$CLUSTER + +# Do actual stuff + YEAR=$(date +%Y) _int() { |