]> WPIA git - infra.git/blob - bootstrap_with_nre
upd: changes according to current gigi changes
[infra.git] / bootstrap_with_nre
1 #!/bin/bash
2 sudo apt-get install libfaketime
3 if ! [[ -d nre ]]; then
4     read -rp "URL to NRE git repo: " nre
5     git clone "$nre" nre
6     cd nre
7     read -rp "Update your Organisation name..." tmp
8     for command in "$VISUAL" "$EDITOR" emacs nano vim vi ex ed; do
9         "$command" commonFunctions.bash &>/dev/null && break
10     done
11     . conf-puppet
12     cat >> config <<EOF
13 DOMAIN=$oldDomain
14 EOF
15     read -rp "Years to issue your certificates for: (e.g. 1948 1950): " years
16     ./all root $years
17     cd ..
18     mkdir -p modules/nre/files
19     for i in nre/generated/gigi-*.tar.gz; do tar xvf $i -C modules/nre/files; done
20     mkdir -p modules/cassiopeia_signer/files
21     for i in nre/generated/signer-server-*.tar.gz; do tar xvf $i -C modules/cassiopeia_signer/files; done
22     mkdir -p modules/cassiopeia_client/files
23     for i in nre/generated/signer-client-*.tar.gz; do tar xvf $i -C modules/cassiopeia_client/files; done
24 fi
25 exec sudo ./bootstrap